[ticket/11469] Use method to check config count, instead of repeating it

PHPBB3-11469