Question: Carl Sagan has penned books on how many matters?
SPARQL query:
PREFIX res: <http://dbpedia.org/resource/>
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>
SELECT DISTINCT COUNT(?uri) WHERE { ?x onto:author <http://dbpedia.org/resource/Carl_Sagan> . ?x prop:subject ?uri . }