How did the people of the past count?

First, early man used sign language, to express the number, which he meant. He may have pointed to the three spears in his neighbor's cave, for which he wanted to exchange the captured saber-toothed tiger at his feet. He may have used his fingers, to display the number. Three outstretched fingers on one hand meant "three", no matter, if he has three spears, three saber-toothed tigers, meant three caves or three arrowheads. In everyday use we know, that a "number" is a word or a symbol, that a certain amount (number) indicates. But the number alone doesn't say it, what kind of things it is. For example, "three" or 3 three planes, mean three quills or three textbooks.
At first, people could only count to two. There are still groups of people today, for example among the indigenous people of Australia, the aborigines, who only know three numbers: "like", "two" and "many". When a Native Australian has three or more boomerangs, even if he 10 or even 50 would have, he gives “many” for their number. However, many early peoples already counted up to 10, so much, how they had fingers on their hands. Others counted up 20, so took the number of their fingers and toes. If we count on our fingers, it doesn't matter, whether we start with the thumb or the little finger. Other peoples had fixed rules for this. The Zuni Indians, for example, always started counting with the little finger of their left hand; the Otomaks of South America started with the thumb.
As humans evolved, they used sticks, pebbles or seashells, to represent numbers. You put three sticks or stones next to each other, to show, that you meant three. Others made notches in a stick or knots in a rope, to represent numbers; so you could take them with you or keep them.