Manual:$wgUseCommaCount

Details
Under which condition should a page in the main namespace be counted as a valid article? If $wgUseCommaCount is set to true, it will be counted if it contains at least one comma. If it is set to false (default), it will only be counted if it contains at least one wiki link.

Retroactively changing this variable will not affect the existing count (cf. maintenance/recount.sql).