- Abstract The ability to perceive size is shared by humans and animals. Babies present this basic ability from birth, and it improves with age. Counting, on the other hand, is a more complex task than size perception. We examined the theory that the counting system evolved from a more primitive system of size perception (the leading alternative being that the two systems evolved separately). By using evolutionary computation techniques, we generated artificial neural networks (ANNs) that excelled in size perception and presented a significant advantage in evolving the ability to count over those that evolved this ability from scratch. This advantage was observed also when evolving from ANNs that master other simple classification tasks. We also show that ANNs who train to perceive size of continuous stimuli present better counting skills than those that train with discrete stimuli.