Let's allow action=purge to recalculate the number of pages/subcats/files in a category. We continuously get reports about these counts being incorrect, even for pages with as few as ~300 pages.
Adding/removing pages to/from categories only increments/decrements the counts, never recalculating them from scratch, so as time goes they get more and more out of date. Curiously, there isn't even a maintenance script to rebuild them; they are only reset if the count becomes negative (so obviously incorrect) and sometimes when there are <200 pages.
Currently the only way to force recount is to manually remove the relevant row from the 'category' table. That's suboptimal.
This would need to be limited to categories with, say, fewer than 5000 entries; for pathological cases like [[ https://en.wikipedia.org/wiki/Category:All_stub_articles | Category:All stub articles ]] on en.wp with nearly two million pages, the query takes several minutes to run (I tried on labs and it took 6m18s to count 1,877,668 pages). I also tried [[ https://en.wikipedia.org/wiki/Category:Year_of_birth_unknown | Category:Year of birth unknown ]] and it took only 4.5s for 20,125 pages, so only doing this for categories where the current count is <5000 should be safe?