It depends on how you want to set the whole sequence up. You could have a common event running that will only happen when a variable reaches a certain number (whatever X is), or you could have a person/event that when you interact with it, will tell you how many you have left to kill and then when you kill the correct amount, will say/do something else.
What you want to do is have an event set a variable to 0, then set your battle events so that when an enemy dies, it adds 1 to the variable. Once you are at or over the number, either have a common event play to say "You killed all X amount of enemies" or have the character/event have a new page that will only happen on the condition that the variable is at or above X number.