[ticket/12270] Fixed topic counting bug and tests

Topics was not correctly counted (the counter didn't count topics
that were re-approved, for example, but only the ones that were
unapproved.
This should also fix the test that wasn't working correctly.

PHPBB3-12270