How many {military rank} are to/by {colonel} ?
For the colonel, what is the military rank?
What is the military rank of the colonel?
SELECT ( COUNT ( ?q ) AS ?z ) { ?q property:military_rank resource:colonel }
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/P410> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q104680 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P410 wd:Q104680 }
9791