How many {film editor} are to/by {David Lynch} ?
What is the number of films that David Lynch edited?
How many films are edited by David Lynch?
SELECT ( COUNT ( ?y ) AS ?z ) { ?y property:film_editor 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/P1040> .
?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:P1040 wd:Q2071 }
7