As a wiki user, I want to know the number of total files, not aggregated by type.
If I go to, eg. https://commons.wikimedia.org/wiki/Special:MediaStatistics I can see very detailed status of the total size per section and category, as well as globally, but I cannot get the global total of files, nor the number of files per category.
I believe this number is available, as I can see it on https://commons.wikimedia.org/wiki/Special:Statistics (uploaded files) or could be calculated on the fly by just adding the previous data. Maybe there is a reason the number of total files is not displayed? If there is not, this could be just a UI issue?
While working on T264189, it would be nice to have such a value to perform a sanity check, even if highly cached. It feels weird we have the exact data size total, but not the number of files?
Researching a bit, based on source code of SpecialMediaStatistics.php, adding '(WITH) ROLLUP' to the query (for MySQL and postgres) it would have it for free, or just a UNION.
I tried to see if there was an API call for this, but I couldn't find one.