For reasons, category counts tend to get out of sync, leading to categories having inaccurate counts, even sometimes negative counts (impossible). @Taylor has documented past examples of this at T85696#7105227.
One suggestion (which I pushed a patch for) is to recount categories on action=purge: T85696: Allow action=purge to recalculate the number of pages/subcats/files in a category, but that requires human intervention and someone to recognize the count is wrong. We have a pretty efficient script, recountCategories.php, that should be run regularly to reconcile any remaining differences. We had to run it everywhere for T299244 and the slowest wiki was commonswiki at ~45 minutes.
I propose we run recountCategories.php once a month as a systemd timer.