Counting is probably the first and most basic mathematical operation ever created. The earliest archaeologist finds date counting to the Upper Paleolithic Era (some $50 000$ years ago). As was the case with other mathematical operations, it was developed out of need – in this case to represent the size of the group, the number of animals in a herd and similar things. The first tools we humans relied on to help us count were our fingers (which are still one of the most used counting aids worldwide).
Since fingers are somewhat limited to $10$ , a new invention was introduced – the tally system (earliest known proof of that is from around $35 000$ B.C.). The tally system revolves around scratches on sticks, rocks or bones. The number of scratches represents the number of items counted – five birds would be represented by five scratches, seven mammoths would be represented by seven scratches etc. The “modern” tally system, which we’re still using in this day and age, organizes the scratches (tallies) into groups of five – four vertical scratches and one diagonal (that is drawn across the vertical ones). Eventually, tallies were replaced with more practical symbols – numerals ($1, 2, 3, 4, 5,…$) – which are in wide use today.