On enemy created
Increment player instance variable "bonus target" by 1
On enemy destroyed
Add 1 to player instance variable "bonus counter"
If "bonus counter" = "bonus target", spawn bonus.
You'll need some way to differentiate groups and time out the bonus. I'd use an invisible helper sprite per enemy group. Each enemy can store the helper sprite's uid on creation to keep track of which group it belongs to. You can use this helper object instead of the player object to store instance variables as well.