You could also use an instance variable if you wanted your ammo count tied to the object on screen. So if the object on screen is destroyed and you spawn a new one it will will start with the default value of your instance variable instead of needing to reset your global variable.