If you enter this on the console, all Chemlight_blue are removed from the players inventory:
player removeMagazines "Chemlight_blue";
However, after executing this code:
player removeMagazines "Chemlight_blue"; player addMagazines ["Chemlight_blue", 3]
The player should have 3 Chemlight_blue, but gets 4.
To make matters worse:
player removeMagazines "Chemlight_blue"; player addMagazines ["Chemlight_green", 3]
The player ends up with 3 green chemlights.