How many {Commons category} are for {writing} ?
Tell me how many categories there are for writing.
How many Commons categories are there for writing?
SELECT ( COUNT ( ?g ) AS ?e ) { resource:writing property:Commons_category ?g }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q37260> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P373> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q37260 wdt:P373 ?obj }
1