Counting specific spawned objects with a shared tag

Hello everyone.

Im having some difficulty with a script.

Here is what im trying to accomplish:
-I have a game object called spawner. Attached to the spawner is a spawner script that will spawn a publicly defined gameobject. The spawner has variables to control the time delay between spawned objects, the total spawn amount and the current spawned amount.

I am having difficulty keeping track of spawned objects however. Here is the code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Spawner : MonoBehaviour
{
    public int spawnAmount;
    private int currentSpawned;
    public int allowedSpawned;
    public float spawnDelay;
    float timer;
    public GameObject spawnType;
    Vector3 myPos;
    // Start is called before the first frame update
    void Start()
    {
        currentSpawned = 0;
        myPos = this.transform.position;
        timer = spawnDelay;
    }

    // Update is called once per frame
    void Update()
    {
        timer -= Time.deltaTime;
        if(currentSpawned < allowedSpawned && timer <= 0) //having difficulty counting the active spawned objects
        {
            Instantiate(spawnType, myPos, this.transform.rotation);
            timer = spawnDelay;
            spawnAmount--;
        }
        if (spawnAmount <= 0)
            Destroy(gameObject);

    }
}

Now I am aware of counting game objects with tags. However I have different enemy prefabs that share the same tag “Enemy”, so the script is including all objects with the same tag which is not what I want.
Is there a way in unity to count the game objects that are instantiated by this script?

Any help is greatly appreciated.
Thank you

Update: I have figured out a practical solution to this problem by adding in a functional list:
By using:

  public List<GameObject> children = new List<GameObject>();

    void Update()
    {
cleanup(children);

        if (active == true)
        {
            //gameObjects = GameObject.FindGameObjectsWithTag("Enemy");
            cleanUp(children);
            currentSpawned = children.Count;
            Debug.Log("Total numer of current spawned " + currentSpawned);
            timer -= Time.deltaTime;
            if (currentSpawned < allowedSpawned && timer <= 0)
            {
                GameObject newEnemy = Instantiate(spawnType, myPos, this.transform.rotation);
                children.Add(newEnemy);
                timer = spawnDelay;
                spawnAmount--;
            }
            if (spawnAmount <= 0)
                Destroy(gameObject);
        }
       

    }

    private void cleanUp(List<GameObject> list)
    {
        for(int i = 0; i < list.Count; i++)
        {
            GameObject select = list[i];
            if (select == null)
                list.Remove(select);
        }
    }

This will create the list, add the instantiated object to this list and run a function to check for null objects and remove it. In case anyone was having a similar problem, this solution could be practical for you.