First off, Aryabhatta did not invent Zero. That accomplishment is usually assigned to Brahmagupta.
Second, there is a difference between the symbols we use to represent something, and the thing itself. The “thing” here is an abstraction — the idea of zero, or nothingness in terms of quantity.
Before people came up with the word “Apple”, the fruit apple did exist. What was invented was a way to refer to it in spoken and written language.
Similarly, what Brahmagupta actually invented was a symbol to represent the idea of nothingness in number systems. Before he had done so, people were aware that nothingness of quantity can exist. It’s just that number systems before the invention of zero were not decimal in nature. They simply started with the lowest physical quantity possible — one. The Roman numeral system is an example of such a system.
I am not sure if the Ramayana, and the description of Ravana having ten heads, came before or after Aryabhatta and Brahmagupta. But it does not matter for the purposes of this answer. It is perfectly possible to count to ten using a pre-zero number system.