Scientists say that Venus flytraps might use maths to plan how often they trap and eat bugs.

Usually plants are eaten by animals but with the Venus flytrap, it's the other way round.

A team from the University of Würzburg in Germany discovered that the plant carefully plans its meals by counting.

Its tiny hairs sense each time food, like a fly, has been in contact.

Based on the number of times this happens, the plant decides whether to close its trap and start eating or leave it open.

It also senses the number of movements inside its closed trap, which helps it know how best to gobble up what's inside.