How many {film editor} are to/by {George Lucas} ?
What is the number of films that George Lucas edited?
How many films did edit George Lucas?
SELECT ( COUNT ( ?w ) AS ?c ) { ?w property:film_editor resource:George_Lucas }
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/Q38222 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P1040 wd:Q38222 }
5