Is your numofbullets global variable or is it declared inside Timers OnEvent method.
If it is declared in an OnTimer event method that means that it is cleared after ending of each Timer cycle and then recreated in another cycle with default value which is 0.