Somehow the counts of pages in categories is inaccurate for a small number of categories. The parent task is about finding out how this has happened in the first place. This child task focuses on fixing the data for WMF wikis.
This query shows that there are 654 categories on fawiki where the category.cat_pages does not match the number of entries in categorylinks table. On arwiki this number is 2201 and this query for enwiki will show the number there.
It seems like on all wikis, a drift has occured at some point or over time. Therefore, I am requesting for the populateCategory.php script to be re-run on all WMF wikis to correct the errors. Thereafter, we can monitor these tables to identify if the error reoccures, and do a deeper investigation as to why and how.