How many {doctoral student} are for {Paul Erdős} ?
Did Paul Erdos go to doctoral school?
Was Paul Erdos a doctoral student?
SELECT ( COUNT ( ?c ) AS ?g ) { resource:Paul_Erdős property:doctoral_student ?c }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q173746> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P185> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q173746 wdt:P185 ?obj }
6