Simulations with a brain model used just four nerve cells and found this simplistic organ would be able to count up to, and beyond, five.

The small number of nerve cells needed to count indicates that brain size is not as important as brain organisation, scientists claim.

Simulations showed the simple brain was capable of counting small quantities by closely studying one item at a time, Daily Mail reported.

Previous studies have found bees count in the same way.

But, humans use a different method and look at the whole group of items before counting them.

In lab experiments, bees can count upwards of five and can be trained to select the smaller or larger of two values.

Bees can even choose the value of zero, when trained to select the lesser of two quantities.

The research suggests bees don't need to understand complex mathematics to achieve these feats of quantitative comparison.

'Our model shows that even though counting is generally thought to require high intelligence and large brains, it can be easily done with the smallest of nerve cell circuits connected in the right manner,' says Vera Vasas, a researcher at Queen Mary University of London.

'We suggest that using specific flight movements to scan targets, rather than numerical concepts, explains the bees' ability to count.'

Scientists think their findings, published in the journal iScience, prove animal intelligence doesn't always have to rely on a larger number of neurons.

'Instead, a small number of nerve cells simply need to be arranged in the right way.'

An improved understanding of the intelligence of insects could be used to design more efficient artificial intelligence algorithms.