$wgAllowSlowParserFunctions enables/disables the magic word {{PAGESINNAMESPACE}}. {{PAGESINNAMESPACE}} counts the number of pages in a particular namespace. See https://www.mediawiki.org/wiki/Manual:$wgAllowSlowParserFunctions. Counting pages for this magic word is currently resource-costly, so is usually disabled to prevent performance issues. This is now old Technical-Debt
By creating a new database table storing the count (since we don't have a large number of namespaces), or other mechanism (indexes etc.)
This would enable T385002: Special:NamespaceInfo should include counts of {{PAGESINNAMESPACE}} to be arranged in a straightforward way.
More generally, it would allow the magic word {{PAGESINNAMESPACE:foo}} to be re-coded and enabled generally.