[ticket/13071] Only use total_match_count after event dispatcher

PHPBB3-13071
Merge pull request #2978 from blitze/ticket/13071

[ticket/13071] Only use total_match_count after event dispatcher
Merge branch 'develop-ascraeus' into develop