If you want to restore unit numbers there are a few different ways to do it.
1. Merge 2 units of the same type by dragging their unit card ontop of th otherone. The units have to be in the same army to do this and it will only work on units from the same country.
2. In era 2, if you choose autocracy one of the last technologies is "field hospitals". Move the unit into a terretory with a field hospital and right-click it to restore the full unit numbers.