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:

all pages are considered as valid articles the page must contain a comma to be considered valid the page must contain a wiki link to be considered valid the value will be set at run time depending on  : if   is false, it will be 'link', if it is true it will be 'comma'
 * 'any':
 * 'comma':
 * 'link':
 * null:

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