Problem with Serial.read and bigger numbers

I'm able to only read 5 digit numbers so if I want to write 10 I'd have to write 00010.

That wouldn't be the case if you used end of packet markers. The Serial Monitor can even add them for you.