How many {military branch} are for {James Stewart} ?
What is the number of military branches for James Stewart?
How many military branches are for the {James Stewart} ?
SELECT ( COUNT ( ?o ) AS ?d ) { resource:James_Stewart property:military_branch ?o }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q102462> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P241> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q102462 wdt:P241 ?obj }
4