How many {doctoral advisor} are to/by {J. J. Thomson} ?
What is the number of doctoral advisors that J.J. Thomson has?
How many {doctoral advisor} are there to {J. J. Thomson} ?
SELECT ( COUNT ( ?g ) AS ?t ) { ?g property:doctoral_advisor resource:J._J._Thomson }
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/P184> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q47285 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P184 wd:Q47285 }
16