Manual:Article count/fr

est un mot magique qui renvoie le nombre de tous les articles. Par défaut, une nouvelle page dans l'espace e nom principal (celui sans préfixe comme « Utilisateur: » ou « Discussion: ») sera comptée en tant qu'article dans les statistiques et la variable  (sur ce projet cela donne actuellement ) si elle contient au moins un lien wiki (par exemple le texte « Main Page ») et n'est pas une redirection. Which namespaces are used can be controlled by.

Before this count was used, an article was counted if it contained at least one comma. That method proved to be unreliable in many languages where the comma does not have much or any significance (see Article count reform for the process which led to this outcome). However, the comma count is still common in the wiki world; see, e.g., BiggestWiki.

Changing the MediaWiki article count settings
Before, the method used to count articles was determined by the configuration variable which was at the same time deprecated and later removed in. Since 1.18, the variable is used.

In, the default setting for is "link", which means   counts all pages in the main name namespace that are not a redirect and contain at least one wiki link. This includes stubs containing a link, and disambiguation pages.

In recent versions of MediaWiki, the existence of links is checked against the values that you also find in the database tables, including not only pagelinks but also templatelinks, categorylinks and imagelinks.

To change to a different method, use one of the following approaches:

MW 1.18 and after

 * Define the article count method with the variable.

MW 1.17 and before

 * If you want to count articles only if they contain a comma, you can set the variable to   in.

Updating article count statistics
If you want to recount your statistics to reflect the change to comma-based "good article" count (that doesn't happen automatically), run from a command line.

If you only have access to the database you can get an approximation with a query similar to the following, which however only checks page links (similar to the "link" method):