When we add up the apples in a basket, we step through the sequence of numbers until we run out of apples. This requires the language ability to remember the words for each number and their order. Animals probably can’t do this.
But there is another sort of counting where you intuitively judge the number of objects without starting from one. This is called subitising and most humans can do it for four or five objects and sometimes more.
Many animals have this skill too, even quite primitive ones. Red-backed salamanders can tell the difference between one, two and three. Mosquitofish can manage up to four. Ring-tailed lemurs can also put groups of different numbers of objects in order of size. They can tell which group is larger, but only when one group is at least twice as big as the other.