How do i make limited arrows in my archery game?

You can just use a simple variable to store the amount of arrows you have. For example:

var arrows : int = 100;

function Update () {
if (arrowfired == true){
firearrow;
arrows -= 1;
}
}