How many {screenwriter} are to/by {Ingmar Bergman} ?
Ingmar Berman wrote what number of script plays?
How many screeplays were written by Ingmar Bergman?
SELECT ( COUNT ( ?v ) AS ?b ) { ?v property:screenwriter resource:Ingmar_Bergman }
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/P58> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q7546 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P58 wd:Q7546 }
56