[ticket/13071] Only use total_match_count after event dispatcher

PHPBB3-13071