How do you make an ammo system

In my game Response Team, I’m trying to create an ammo system. For example, it starts with 64 ammo, when you shoot it it loses one, and you can collect ammo.

http://flowlab.io/html5/bin/1278662

https://flowlab.io/game/play/1271509
Iv’e made fully working guns, use my system instead