I want to query a Wikimedia Commons category and get the count of sub categories and photos in a category. For example when you look at the web page "Category:Collections of the Brooklyn Museum" in Wikimedia Commons, you get the list of subcategories.
One of the subcategories
European art in the Brooklyn Museum‎ (7 C, 301 F)
has the numbers 7 C
and 301 F
which means this has 7 categories and 301 images.
How do I query the Wikimedia Commons to get this category and image count information of subcategories?
I tried the following queries
which gives me the category members of the category.
I can do an action render query which produces the html representation from which I can scrape the 7 C
and 301 F
count information.
What query can I use to get this count information without the html scraping?