If I earn units when the units backend thingy is down (displaying units as '0' basically), will they add up later? Or will I just lose them because I earned them when the backend was down?

The developers have made the game able to remember how much exp and what achievements you have earned while the backend servers are down.

Most likely said system is also able to remember how many units you have earned and then promptly give them to you once the connection to the backend servers have been re-established.
Also due to the fact that achievements give out units when completed, it would be weird for said system not to remember earned units.