Pythagoras, Euler and Fermat may not be nervously twitching in their caskets just yet, but the uniqueness of humankind's mathematical abilities has taken yet another knock from the animal kingdom. Fish are able to count to four, according to experiments which involved giving them the option of joining shoals of different sizes.

Their numerical ability is on a par with that of monkeys, dolphins and children aged between six months and 12 months. "We have provided the first evidence that fish exhibit rudimentary mathematical abilities," said experimental psychologist Christian Agrillo, of the University of Padova in Italy.

He and his team investigated the behaviour of mosquitofish. The freshwater species - which is also known as the live-bearing tooth carp - is originally from North America but was introduced into Europe nearly a century ago. To deduce whether the fish have a head for figures, the team made use of the fact that females who are being harassed by a male will bolt for the largest nearby shoal for cover.

In their experiment, the test fish is in a central tank separated from two side tanks containing shoals of different sizes which it can see. When harassed it will go towards the larger one, even though it cannot actually join the fish there. The researchers showed that the fish could distinguish between shoals containing one or two fish, two or three fish and three or four fish. They could not tell the difference between shoals of four or five.

At larger numbers the difference between the shoals has to be bigger for the fish to make a meaningful choice. A ratio of 1:2 is high enough, such as the difference between eight and 16 fish in a shoal. But when the difference is smaller, such as 12 to 16, the fish do not show a preference.

"We suggest that mosquitofish use two distinct systems for quantity discrimination," the team wrote in the journal Cognition. The story is reported today by loveearth.com, BBC Worldwide's natural history site.

A variety of animals, including pigeons, parrots, raccoons, ferrets, rats, monkeys and apes have been shown to manage a selection of mathematical tasks, including counting, adding or subtracting numbers. Mostly this requires training by experimenters.

But wild lions use an innate numbering system to handle other approaching lions. If they hear the roar of one individual they will send two or three females to investigate the stranger. But if there are two approaching lions they keep their number advantage by sending a welcoming committee of four.