Actually, that is not correct.
Ammo is shown either by a recharging bar or number shown in the upper left corner.
The one, two, or more rectangles under the health bar on the right shows how many people the vehicle can hold, and how many people are currently in the vehicle.
If the box is colored in, it means someone is in that seat. Most tanks have two seats, a pilot and turret gunner. Some vehicles, like the LAAT gunship or Desert Skiff hold even more.