Question: Terry Pratchett has written about how many topics?
SPARQL:
SELECT DISTINCT COUNT(?uri) WHERE { ?x <http://dbpedia.org/property/author> <http://dbpedia.org/resource/Terry_Pratchett> . ?x <http://dbpedia.org/ontology/nonFictionSubject> ?uri  . }