The Pagecounts Tool is used to populate the article numbers on www.wikipedia.org. Recently, this tool started showing 0 as the page-count for all wikis :(
https://tools.wmflabs.org/pagecounts/pagecounts.json
The tool makes a simple DB query on the Toolforge database, something like:
SELECT ss_total_pages, ss_good_articles FROM site_stats LIMIT 1
When trying to manually make this call with the Pagecount credentials, or even accessing the site_stats table, the following error occurs:
MariaDB [enwiki_p]> describe site_stats; ERROR 1356 (HY000): View 'enwiki_p.site_stats' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
The Pagecounts code is hosted on GitHub here https://github.com/MaxSem/pagecounts/blob/master/pagecounts.php#L35
Other report: https://www.mediawiki.org/wiki/Topic:Up0qpe0wey94ca5n