How many {director of photography} are to/by {David Lynch} ?
Director of photography David Lynch has done how many shots?
How many shots are done by David Lynch, director of photography?
SELECT ( COUNT ( ?t ) AS ?q ) { ?t property:director_of_photography resource:David_Lynch }
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/P344> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q2071 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P344 wd:Q2071 }
5