Last modified: 2009-10-22 06:29:25 UTC
When one looks at a category, say "category:X" usually it lists a variety
of sub-categories, and also a variety of assorted articles which belong to
Would it be possible next to each subcategory to give a count of the
number of unique pages within that sub-category?
The idea would be, to see at a glance which sub-categories had many
I understand that there is a risk of circularity in the counting, I don't
know if that makes it technically impossible. Thoughts?
This would probably be unnecessarily expensive.
What about just one level down? i.e. listing the number of immediate
sub-categories and the number of immediate pages that below to this category.
This prevents circularity, and also the running cost could be amortized as follows:
Each category keeps the two counts as part of its database entry.
When a page/category list this category as its immediate parent, the
corresponding count is incremented.
When a page/category delist this category as its immediate parent, the
corresponding count is decremented.
When this category is listed as a subcategory of its parent, the two counts are
furnished for display.
All the above operations take constant time.
I would also like to express my support for such a feature. Just brackets after
the sub category name, which contains the number of objects within that
category, wich I suppose should hold both pages and further subcategories.
where X = direct member articles and Y = direct member subcategories?
This bug seems to be much easier now that bug 6943 has been fixed.
If I understand this bug report correctly, this already works on Wikipedia (probably through the CategoryTree extension). If not, please reopen the bug with a description what is still missing.