The ability to solve complex math problems is one thing that sets humans apart from the rest of the animal kingdom. Despite this fact, some animals do seem to have at least one basic mathematical ability — they can, in a sense, count.
In the early 1900s, the horse Clever Hans drew worldwide attention in Berlin when his trainer demonstrated that the ungulate could count (and solve math problems), tapping his hooves to indicate a number or correct option among multiple choices. Researchers later discovered that Clever Hans didn’t actually have mathematical skills, but the horse did demonstrate impressive observation skills. That is, he was unable to answer questions that his questioners also couldn't answer because Clever Hans was actually reading minute facial and body cues to determine the correct responses.
While Clever Hans failed his math quiz a century ago, studies in more recent decades have shown that numerous species do actually have a "number sense," or the ability to discriminate between different quantities of objects.