In 5.x, this would be difficult, though you can sort categories by 'number of books' in the tag browser.
Running Calibre from source (currently it's on the 6 beta) added a template function that may help. See these for more info:
https://www.mobileread.com/forums/sh...d.php?t=347693
https://www.mobileread.com/forums/sh...5&postcount=83