How many {head of state} are for {Ukraine} ?
What is the number of the heads of state of the Ukraine?
How many heads of state does Ukraine have?
SELECT ( COUNT ( ?m ) AS ?d ) { resource:Ukraine property:head_of_state ?m }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q212> .
?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> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q212 wdt:P35 ?obj }
1