Each ground vehicle has its ammunition stored in racks. Each vehicle has its individual rack configuration and each rack is carrying a specific number of shells. These racks can be seen in-game with X-Ray viewing mode (be sure to bind a key to 'Show the status of the vehicle modules' under Controls/Common Controls Tab/Basic Section).
Single piece ammunition Most tanks use single piece ammunition where projectiles and propellants are in one piece.
Two piece ammunition Some high calibre cannon have two piece ammunition where projectiles and propellants are stored and loaded separately. Each piece has their own individual racks. These racks could synchronize depletion (for example Jagdtiger) or deplete independently of one another. (for example M103).
Magazines and ammo boxes Vehicles with automatic cannon have their ammunition stored in magazines, clips, belts and/or ammo boxes. In the loadout screen ammunition amount is selected in magazines. For example the Ostwind can load up to 125 magazines instead of 1000 shells.
Multi turret and multi cannon tanks Multi-turreted and multi-cannon vehicles (for example T-35 or M6A1) have individual racks for each ammo type. Tanks like the Maus could also have three kinds of racks, 12.8 cm projectiles, 12.8 cm propellants and 7.5 cm shells.
Twin and Quad cannons Some SPAA's have twin and quad mounts for their main armament. Each of these cannon gets loaded separately. Since all of its guns are firing in more or less a synchronized manner, it may look like the cannon are loaded as one. For example, the M13 MGC hold 2*200 rounds in its two machine guns, while the game shows it as 400 rounds loaded.
Racks vanish once all shells in that rack are depleted. For example, a rack carrying 6 shells vanishes once all of its six shells are depleted. However, see "Visual Discrepancy" below. The order in which the racks are depleted and vanish are hardcoded and can't be changed.
Ammo racks are shared for all shell types loaded. It doesn't matter which shells are used first, the racks will always depleting in a given order (assuming the ammunition is all fired from one cannon).
Currently, (Stand: 1.65 ) most tanks have a visual discrepancy of how many shells each rack contains. This may change in future patches, however the x-ray function is considered "for immersion" only, and is not intended to be dynamically accurate. See 
Optimized ammo rack loadout
The fastest way to get destroyed in War Thunder Ground Forces is by the detonation of the ammunition. A way to increase survivability is to reduce the number of shells loaded on the tank. Survivability is not guaranteed while shells are stored in bundles, distributed all around the tank in different locations. These racks can be seen with x-ray view, and are consumed one by one (rack by rack, not shell by shell) when all shells in the rack are fired. Once a rack is gone/depleted, it cannot explode anymore, thereby decreasing the chance of getting 'ammo racked'.
Being 'ammo racked' is the situation in which a group of ammunition takes damage from enemy fire (gets shot by another tank) and causes the explosive mass in the ammunition to detonate. Any time ammunition inside the tank is detonated, it causes catastrophic damage to the tank.
Each tank has a different ammo rack setup and therefore, there is no universal rule on how much a lower ammo count increases survivability. Ammo racks in the turret are much more susceptible to being shot, but there is no guarantee that the ammo rack in the turret is the first to be expended.
The loadout screen shows the number of unloaded shells in brackets. The number remaining to be loaded are a total of the max, and not per shell type.
Use this to gauge how much ammunition and how much of each type to bring when considering the number of ammo racks filled and survivability.
How to read the ammo rack tables
The tables show the following information for each tank:
- Rank shows the rank of the vehicle.
- BR shows the Arcade Battle Rating
- Type shows the tank types: LT - Light tank, MT - Medium tank, HT - Heavy tank, TD - Tank destroyer, AA - Anti Air vehicles
- Tank shows the name of the tank
- It also shows if the racks in its row are for the Main or Secondary weapon or if it is for Projectiles or Propellants
- Full ammo shows the maximum number of shells that can be loaded
- x'th rack empty shows the number of shells that can be loaded to have the listed rack be depleted (thereby removing it from the tank). For example, the US M2A4 can load a maximum of 103 shells and has three ammo racks. With loading only 69 shells, the first rack is removed.
- The numbers in the brackets are just there to help adjust the shell load in the loading screen. Read more about it in the next section.
- The number of racks per tank can be determined by the number of columns that tank has the table. Only very limited number of tanks have more then ten racks and are mentioned in the comments column.
- Visual discrepancy shows if there is a visual difference in X-Ray view of the number of shells per rack and the amount that the game counts.
- Recommendations shows a recommendation for a possible optimal loadout. Depending on the play-style, there may be a preference of more or fewer shells.
- Comments shows miscellaneous comments related to the tank, or its racks.
- Image shows a X-Ray image of the tank with the order in which racks are depleted.
Most of the data for the tables was collected on Version 126.96.36.199 and may change with future patches.
Last update: 188.8.131.52
Ammo rack tables
Related forum thread: http://forum.warthunder.com/index.php?/topic/246940-ammo-racks/