How Do You Limit The Number Of Shots?

I have created a script that makes a bullet, adds force to the bullet, and sets and integer. Once the bullet is fired it sets an integer that adds up, and once those integers add up to the limit, it should make them stop, or not be able to shoot anymore. Here is the script (C#) :

using UnityEngine;
using System.Collections;

public class PlayerShoot : MonoBehaviour {
	
	public Rigidbody2D bulletPrefabLeft;

	public Rigidbody2D bulletPrefabRight;

	public bool canShoot = true;
	
	// Update is called once per frame
	void Update () {
				if (Input.GetKeyDown (KeyCode.Mouse1)) 
				{
					if(canShoot == true) 
						{
								BulletAttackRight ();
								PlayerPrefs.SetInt ("playerShots", 1);
						}		
				}
				if (Input.GetKeyDown (KeyCode.Mouse0)) 
				{
					if(canShoot == true) 
						{
								BulletAttackLeft ();
								PlayerPrefs.SetInt ("playerShots", 1);
						}
				}
				if(PlayerPrefs.GetInt ("playerShots", 0) >= 3){
						canShoot = false;
					}
				}

	void BulletAttackRight(){
		Rigidbody2D bPrefab = Instantiate (bulletPrefabRight, transform.position, Quaternion.identity) as Rigidbody2D;
		bPrefab.rigidbody2D.AddForce (Vector3.right * 500);
	}

	void BulletAttackLeft(){
		Rigidbody2D bPrefab = Instantiate (bulletPrefabLeft, transform.position, Quaternion.identity) as Rigidbody2D;
		bPrefab.rigidbody2D.AddForce (Vector3.left * 500);
	}
}

If you can please help me with this because it is very frustrating.

Setting an Int in playerPrefs do not add it to it’s previous value, it will overwrite the value. And You should use a int variable to count bullets. PlayerPrefs is used to save persistent data such as Player settings, scores etc.