Board Thread:Questions and Answers/@comment-30587784-20161124134925/@comment-27701762-20161124190827

The number is found on the Genocide Route page, but the easiest way to do it is simply to keep grinding until you get the message "But nobody came." At that point the music becomes heavily distorted, and it is safe to fight the boss of the area without consequences. Making sure to get that message prevents running into problems of accidentally killing too few enemies before encountering the boss.