How many {office held by head of state} are for {Romania} ?
The capital stteof Romanis has hold now many executives?
How many executives held by the capital state {Romania} ?
SELECT ( COUNT ( ?c ) AS ?m ) { resource:Romania property:office_held_by_head_of_state ?c }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q218> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1906> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q218 wdt:P1906 ?obj }
1