Counting of objects always gives 1 extra

Hello

I have a small bowling game with 6 pins. Each time you hit a pin, it deletes, until there are none remaining ones, it respawns all 6 of them again.

At start, I instantiate a prefab that contains a pack of 6 of them, It counts the amount of those type of objects in scene to give the total and each one that falls, gets destroyed and the count removes it. Works fine deleting each one of them until reaches 0 and respawns the next batch, but from the second iteration, instead of 6, it counts 7 now? I don’t know where the extra one comes from, the pins on scene are 6, but the variable is 7. It breaks the mechanic of restarting until it reaches 0, because from there, there’s always one left that can’t be deleted, not even shows on scene, and stops all the game mechanics for respawning the next one.

Hope this is clear, here’s my code:

public class PinManager : MonoBehaviour
{
    [Header("Spawner")]
    public GameObject pinSetPrefab;
    public Transform spawnLocation;

    [HideInInspector]
    public int pinsInScene;
    [HideInInspector]
    public int pinsCount;
 
    private void Start()
    {
        ui = GetComponent<UIManager>();

        if (pinSetPrefab != null)
        {
            SpawnSet();
        }
        else
        {
            Debug.LogError("Cannot spawn pins! Spawn prefab is missing.");
        }
    }
//Instantiate the prefab with a 6-pack pins, then counts them in another function
    public void SpawnSet()
    {
        Instantiate(pinSetPrefab, spawnLocation.position, Quaternion.identity);
        CountPins();
    }
//Counts the amount of pins on scene by finding their tag, counts the 6 of them at start, then 7 (error)
    public void CountPins()
    {
        var findPin = GameObject.FindGameObjectsWithTag("Pin");
        pinsInScene = findPin.Length;
        pinsCount = pinsInScene;
        Debug.Log(pinsInScene + " pins in scene");
    }
//If the count is 0 after the player erase all of them, the spawn function from the beginning calls again and the iteration begins, but it brokes
    public void CheckPins()
    {
        if(pinsCount <= 0)
        {
            pinsInScene = 0;
            SpawnSet();
        }
    }
    public void UpdatePinsUI()
    {
        ui.pinsCounterText.text = pinsCount.ToString();
    }

}

Pin removal code
(seems no poblem here but just in case)

public class PinEraser : MonoBehaviour
{
    public PinManager pinManager;

    private void OnTriggerEnter(Collider other)
    {
        if(other.CompareTag("Pin"))
        {
            Destroy(other.gameObject);
            ProcessPin();
        }
    }

    void ProcessPin()
    {
        pinManager.pinsCount--;
        pinManager.CheckPins();
    }
}

image