Babies who are years away from being able to count out loud have a sense of what counting means, researchers believe.