Learning how to throw a ball is through trial and error. Estimating temperatures is through the experience of associating a number with a sensation. None of this involves any math.
We are not born with a sense of number. There are tribes that have no words for numbers greater than 3. Historically, at around the same time that people developed writing, they also understood the concept of number. My guess is that these two skills are related, both being ways to make use of symbolic reasoning.
It’s actually a super interesting question. How did the human brain evolve to be able to do math? Was there selective pressure for cognition and adaptation? There is an entire field called Evolutionary Psychology that is devoted to this. I’m actually reading a book on it now.
The Abucus was invented and before that they used beans etc
Later on people figured it out by observation.
Filling a bag with beans or whatever became a measuring tool.