How to create a spawner like in Caverns of Delirium?

How would I create a spawner that spawns enemies until a certain kill count is reached?

.

This is my game so far http://flowlab.io/game/view/117861

One more thing, how do I make it so that an animation plays one at a time?

.

I did that now, I just need to make a spaceship that shoots. Thx

Is there a way to make a kill counter? and how do I make a spaceship that shoots? Does it require a new sprite?

.

.

.

420 Blaze it!!!

How would I make it end the game when the kill counter reaches a certain number?

I can’t seem to figure out how to make the enemy destroy when the bullet hits it, and I did everything you said, can you elaborate? Or go over my game and see where I went wrong? http://flowlab.io/game/view/117861

.