It has long been accepted that many birds are notably clever creatures. Crows , for instance, are practiced thieves who keep track of where people hide food and shiny valuables. They can even be taught to use vending machines. Now a new study has found strong evidence that robins are also clever birds, and can even count.

That's at least according to a study recently published in the journal Behavioral Processes, which details how wild robins in New Zealand become noticeably bothered when they've been "cheated" out of a set number of promised mealworms.

In a standard test used to determine an animal's ability to measure values, researchers placed a small box with two layers in the woods. Making sure that robins were watching them, they placed a pair of small mealworms into the box's second layer. They then slid the first layer on top - this layer only containing one small worm.

From the bird's perspective, the box should contain two worms, but they will only have access to the layer with one.

"The robins clearly recognize that there is only one worm when they saw two go into the box," explained New York Times scientist writer Jim Gordan, who was not involved in the study. "That's when they search intensely with a lot of pecking."

According to the study, in nearly every instance where this experiment was done in the field, the robins started furiously pecking around the box when the math didn't add up. This searching didn't occur for nearly as long or as vigorously as when the birds found the exact number they were expecting.

This is a strong indication that the robins can at least count in small values, but what exactly makes counting necessary?

Study author Jason Low believes that this has to do with the robin's tendency to leave cashes of food near their homes - a behavior he and his colleague Kevin Burns observed back in 2006 and 2007.

When males are away looking for food, their female partners have been observed raiding these cashes. Interestingly, they always go for the cache with the most stored food.

"We asked ourselves, how does she know to rob the site with the biggest food source? And that's when we started to think that these birds understood the concept of amounts," Burns explained in a statement.

However, this counting goes both ways, as males know how much they've stored.

"The males get very aggressive when they catch their female partners stealing from them," Burns said, adding that these squabbles over who had their hand in the "cookie jar" last are common among robins.