Because this question is also semantically interesting, semiotic aspect should be considered as well.
Taken certain signs in the ancient human history were used for accounting, i.e. marking cycles and quantities of objects, same signs could have been used for "anything" else. There is nothing fundamental restricting that.
One can count or express quantity without a written sign, for example by fingers. This already suggests that any symbol one takes, it by default means also something else. A finger is one, one is a finger. When writing systems developed, that continued to apply. For example Egyptian symbols (3000 BC) denoting numerals also meant an heal, a rope, a lily, a frog, etc. In many semitic languages (for example in Hebrew), and others like Greek and Latin, alphabet signs were also numerals. And they still continue to be.
We can see by these examples that numbers, were they ordinal or cardinal, represented other things too from the very beginning. No matter if signs were simple notches made with a sharp object to the other object, or if signs were more sophisticated ideograms or pictograms.
So semantically answering to the question "When were numbers first used for anything other than counting?" I'd say that practice goes before writing systems were established. And it was other way around, abstract numbers came later. Special cases usually become before a general abstraction. But mental ability to abstract the usage of numbers purely as quantities probably evolved also before writing systems so it is hard to tell when it happened. On the other hand it is quite safe to assume that numbers as separate mental signs and entities were strongly evolved along with agriculture and colonization in the Near East between 10000 BC - 5000 BC. In the 4th and 3rd millennium BC Mesopotamia we can find a lot of metrological texts using numbers to purely denote quantities and measures like a length, a weight, and a capacity.
In Babylonian number systems two different strokes made with a wedge were strictly used to denote single digits and powers of ten. There might be an era, where accounting practice related to taxation forced to use numerals in a very strict sense. One can see a wavy tendence to use number symbols purely for quantities, closer we come to our age.
But as noted on other answers, even in 500 BC, Pythagoras promoted the idea of quality over quantity in numbers. So the number abstraction in the sense of strictly meaning only quantity or magnitude never broke totally thru, at least before the modern era. And actually in the modern mathematical notation we hardly ever use numbers, but variables and other abstract symbols instead.
Maybe the question could be elaborated a bit so that we would like to know, when numbers were either used operatively within formulas or grouped to characteristic sets rather than just as physical counter ticks similar to the Lebombo bone or the Ishango bone? We can try to deduce it from the cave paintings and built structures left from the ancient past. But surely we know it only from the written texts in the 4000 BC - 3000 BC that there is a hint of areas being calculated in Uruk [a]. Also big numbers exceeding tens of thousands and millions might suggest that some addition / multiplication operations has been done rather than counting objects one by one. Major corpus of mathematical texts, where numbers were used in complex equations, not just as counters, come from Mesopotamia and Egypt, 1800 BC [b].
a) Pyramids and Cones in Cuneiform and Other Mathematical Texts, Jöran Friberg (1997)
b) History of Mathematics, Vagn Lundsgaard Hansen, Jeremy Gray (2010, page 5)