how to keep count on how many left of the instantiated clones i.e enemy

Im using the following script to instantiate the clone

public GameObject playerhealth;
public GameObject enemy;
public float spawnTime= 3f;
public Transform spawnPoint;

public float dis;
public static GameObject obj;

void Start(){

	Invoke ("Spawn", spawnTime);
}

void Spawn(){
	
	if (dis < 100) {
		
		obj =	Instantiate (enemy, spawnPoint.position, spawnPoint.rotation);

		obj.name = "Abc";

	}
}

You create an EnemyCounter. Can be an independent component, a variable stored in a file or scriptable object or whatever. Then you do something like this:

void Spawn()
{
         //your spawn logic
       enemyCounter.enemies += 1;
}
 //Then in your enemy you set a component with this
 void OnDisable() 
 //or on death or something like that if you want to keep it in the scene
  {
          enemyCounter.enemies -= 1;
  }

Have a container object to store them and keep count. Create an empty GameObject in your hierarchy, add it to your script and when you instantiate your new clone, use that GameObject’s transform as the parent:

public Transform enemyContainer;
...
obj = Instantiate (enemy, spawnPoint.position, spawnPoint.rotation, enemyContainer);

You can then get the number of enemies by checking for the number of children inside your container:

Debug.Log("Enemies: " + enemyContainer.childCount);