Which came first: the mathematical mechanics in the real world or the existence of mathematics (numbers)?
Both are concepts. Both were to be discovered, so they must exist. Simultaneously?
Is mathematics an invention or a discovery?
Discovery. It existed before humans in the form of gravity, for instance!
Numbers are merely symbols or names created by humans to describe patterns and assign a specific set of rules to their observations. I think this probably is the case, as without humans, animals may not understand the concept of numbers fully: one, two, three, e.t.c.