Manual:$wgArticleCountMethod

Details
Method used to determine if a page in a ContentNamespaces>Special:MyLanguage/Manual:$wgContentNamespaces|content namespace should be counted as a valid article.

Redirect pages will never be counted as valid articles.

This variable can have the following values:

the page must contain a wiki link to be considered valid the page must contain a comma to be considered valid all pages are considered as valid articles
 * 'link':
 * 'comma':
 * 'any':
 * Any other value will have the same result as 'any'.

Retroactively changing this variable will not affect the existing count. To update it, you will need to run the  script.