How many {programmer} are to/by {John Carmack} ?
Which is the number of programmers that work for John Carmack?
How many programmers work for John Carmack?
SELECT ( COUNT ( ?y ) AS ?o ) { ?y property:programmer resource:John_Carmack }
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/P943> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q92605 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P943 wd:Q92605 }
27