This is the type of thing variables are extremely useful for! You can set up a variable, either a private one belonging to the player or a global one, to keep track of the missiles. The initial value can be set to 3, or however many you want to have at the start.
Every time you click the right mouse button, check the value of the variable; if it's greater than zero, meaning you have ammo, fire a missile and subtract one from the variable, but if it's zero, you ran out, so don't do anything.
If you have trouble implementing that idea, I could whip up a quick example to show you how it works.