Limiting the amount of objects that exist after they are cloned by Instantiate.

I am a new programmer in my school and i am working on my first school game project where i have a character that shoots bullets ( an object) to the world. I have the shooting mechanism right but the one thing i actually want to fix for this system is that the objects the Instantiate clones is limited to 5. I dont know how to limit the objects directly(Basically i want 5 objects to be cloned and if the it tries to summon a 6th object, the 5th object gets replaced by the 6th object). I have tried multiple tutorials and answers here in Unity but so far, no luck.

Here is the code

using UnityEngine;
using System.Collections.Generic;

public class ShootingScript : MonoBehaviour {

    public Rigidbody Projectilebullet;
    public float ProjectileVelocity = 10f;

    
    // Use this for initialization
    void Start () {
	
	}

    // Update is called once per frame
    void Update()
    {

        if (Input.GetButton("Fire2") && Input.GetButton("Fire1"))
        {
            Rigidbody One;
            One = Instantiate(Projectilebullet, transform.position, transform.rotation) as Rigidbody;           
            One.velocity = transform.TransformDirection(Vector3.forward * ProjectileVelocity);              
            }
        }
    }

How are these bullet objects being destroyed? If they are not being destroyed, that’s a problem. Essentially, once you have code to destroy the bullets, you simply need to increment a counter when you instantiate a bullet and decrement the same counter when you destroy a bullet. With that, you’ll know exactly how many bullets are “alive” in the scene. Then, you can simply check the counter prior to instantiating another bullet. If you already have the max items alive, just don’t instantiate another one.