For us humans it is a process of establishing a one-to-one relationship between objects and a long-since-memorized sequence of words that requires just one member of the sequence to be remembered in order to represent the number of objects.
I think that's part of it to be sure. However I can readily account nine items versus ten items depending on how they are organized. We are counting when we are enumerating, however that occurs in man, bird or bee it seems to me.
This article goes into it and mentions "numerical distance effect", which looks appropriate but not what I remember.
I did learn that people who play first person shooters can usually recognize more objects at once instantly; 6 or 7 instead of a more typical 4 or 5, if I recall correctly.