Atm there is no way to return the correct number of categories, because {{PAGESINNS:14}} counts all pages like manually created redirects while {{NUMBEROFARTICLES}} excludes those.
The easiest way might be a global to define if redirects should be counted (default) or not for {{PAGESINNS}}.
Version: unspecified
Severity: enhancement