"gearIDCAmmoCount" and "gearSlotAmmoCount" commands are Arma 2 commands which only work with old style gear UI. They do not work in Arma 3. Also their complementary commands "setGearIDCAmmoCount" and "setGearSlotAmmoCount" have been removed from Arma 3 long time ago, I guess for the same reason.
What we need is a command to read and set ammo count by magazine ID