I wonder if counting at least originated before humans - could a flock of, say, elephants count, in some way, the ones present, to make sure that the flock was intact? I have not read about it, and it would be nice to know what experts on animals' abilities of counting would say.
There are probably other beings/life forms in the universe that understand mathematics. There may even have been ancient life forms on earth that understood mathematics. And there is also this evidence that animals have some sort of instinctive understanding of math: https://www.sciencenewsforstudents.org/article/its-math-world-animals
I think counting comes from a yes/no acceptance dichotomy with the ability to repeat. Yes it's okay you steal some food, I'll steal some of yours. Or yes twice to say twice as much. The sounds made are copied by nearest neighbours and mutate independently along the way. A doubled "uh" is a "ooh", like in one and un, and in two and deux.
If we put mice in containers with an escrow and a button and a unique food each, I bet they could ask each other to trade different types of food more or less out of shear need for dominance/equality. Split it multiple ways, or in chains and the language will equilibrate across neighbours and value loops can persist. Farmer beats worker beats child beats farmer. Paper, scissors, rock. One mice likes trading chillies for pineapple, another likes trading pineapple for apple, another apple for chillies. Except they each over time grow proportional to the value growth of the loop, and this equilibrates the loop and each compete over their common uniqueness in their food type. Allow them to trade more than just the unique food across chambers and they might eventually end with a more mixed diet, and the language difference between value loops it's pattern recognised to name each food.
Each step in the sequence could correspond to brain regions and adaptations in brain function, but develop out of a harmony of social order construed by the need to mate and the intrinsic value of trade and the counter consequences of discord.
Acceptance is the first threshold of life to foreign life, which comes out as a yes or no, which begets counting, and having more than one diametric (mother-child and father-child) creates the essential need for you/me to distinguish between that or someone else entirely. And that is attached to the yes/no.
Language is higher than math imo, and tools higher than language.
I describe various processes and phenomena using different equations. I perform various numerical calculations. The question is whether it is mathematics or just a tool in scientific work. Regards,