Mathematics is the abstract study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics. (Wikipedia)
Mathematics is not an invention. Discoveries and laws of science are not considered inventions. Inventions are material things and processes. However, there is a history of mathematics, a relationship between mathematics and inventions, and mathematical instruments are considered inventions.
According to Mathematical Thought from Ancient to Modern Times, mathematics as an organized science did not exist before the classical Greeks of the period from 600 to 300 BC entered upon the scene. There were, however, prior civilizations in which the beginnings or rudiments of mathematics were created.
When civilization began to trade, a need to count was created. When humans traded goods, they needed a way to count the goods and to calculate the cost of those goods. The very first device for counting numbers was the human hand, counting on fingers. To count beyond ten fingers, mankind used natural markers, rocks or shells. From that point, counting boards and the abacus were invented. (inventors.about.com)