How many {head of state} are to/by {Elizabeth II} ?
What Elizabeth II head of state more than once?
How many times was Elizabeth II head of state?
SELECT ( COUNT ( ?l ) AS ?x ) { ?l property:head_of_state resource:Elizabeth_II }
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/P35> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q9682 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P35 wd:Q9682 }
69