[feature/revisions] Fix counting revisions

PHPBB3-10755