Add event listener to stop processing after reaching a given url count (ish)