How to spawn a limited number of a certain type of enemy

There will be a dozen different ways to achieve that and what’s below is probably not the best; merely going by the literal description:

We’d need to know more regarding where you’re taking this and how expandable it needs to be in order to suggest something a bit more maintenance friendly and modular.