Several studies have shown that infants understand some basic concepts about numbers. By around 5 months, infants show surprise when addition or subtraction rules are violated. For example, when babies see an object added to or subtracted from other objects hidden behind a screen, they will stare longer at the objects if an incorrect number of them are revealed when the screen is removed. If they see the correct number of items when the screen is removed, they stare at the objects for a shorter period of time, showing that they can distinguish between correct and incorrect results.
Wynn, K. (1992). Addition and subtraction by human infants. Nature, 358, 749