Int wont increase

Hi there, I’m a new programmer and I have a question about my code! I want to set it so that my bool goes from true to false whenever my enemies hit a certain amount that have been initiated. The problem is my int of enemyCount is just not incrementing. Any Idea why? P.S don’t be afraid to criticize anything else about my code as I’m still new and want to improve.

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

public class EnemyDeath : MonoBehaviour
{
    [SerializeField] private GameObject player;
    [SerializeField] private GameObject deathTrigger;
    [SerializeField] private ParticleSystem enemyGhostDeathFX;

    [SerializeField] private float deathDelay;
    [SerializeField] private int enemyLimit;

    private int _enemyCount;

    private bool _giveCoin;

    //TODO Stop player from giving coin and spawning enemies when the limit of enemies is hit
    void Start()
    {
        _enemyCount = 0;
        _giveCoin = true;
        player = GameObject.Find("Player");
    }

    private void Update()
    {
        if (_enemyCount > enemyLimit)
        {
            _giveCoin = false;
        }
    }

    private void OnTriggerEnter(Collider other)
    {
        if(other.CompareTag("Player"))
        {
            deathTrigger.SetActive(false);
            EnemyDeathSequence();
        }
    }

    private void AddEnemyCoin()
    {
        player.GetComponent<EnemyCoin>().enemyCoinAdd();
    }

    private void EnemyDeathSequence()
    {
        enemyGhostDeathFX.Play();

        Destroy(gameObject, deathDelay);
        EnemyRespawn();

        RingAbilityAdd();

        print(_giveCoin);
        
        CheckToGiveCoin();
    }

    private void CheckToGiveCoin()
    {
        if (_giveCoin == true)
        {
            AddEnemyCoin();
        }
        else if (_giveCoin == false)
        {
        }
    }

    public void EnemyRespawn()
    {
        _enemyCount++;
        Instantiate(PrefabManager.Instance.EnemyPrefab);
        print(_enemyCount);
    }

    private void RingAbilityAdd()
    {
        player.GetComponent<Ability>().AddRingAbility();
    }
}

I think the problem is that your EnemyDeath function is not called and it happens because you are not checking who is Enter on Trigger:
You should specify who is on Trigger Enter.
Give a tag to your player and then check it like:
if(other.tag == “tagthatyougivetoplayer”) the do stuff.

With a quick look it seems like you are destroying the gameobject attached to EnemyDeath who is also the one that should increase _enemyCount, after you destroy it, that count is gone and it will just start from zero. Maybe you should think about adding a score manager with a static count for your enemies or a script that manages your enemies and keeps the count without being destroyed.