[ticket/13071] Only use total_match_count after event dispatcher

https://tracker.phpbb.com/browse/PHPBB3-13071