How many {student of} are to/by {Hans Hofmann} ?
Hans Hofmann had how many students?
How many students did Hans Hofmann have?
SELECT ( COUNT ( ?s ) AS ?g ) { ?s property:student_of resource:Hans_Hofmann }
SELECT (COUNT(?sub) AS ?subs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sub .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1066> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q215461 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P1066 wd:Q215461 }
15