How many {military branch} are to/by {anti-aircraft warfare} ?
What is the number of military branches that have anti-aircraft warfare?
How many military brances have anti-aircraft warfare?
SELECT ( COUNT ( ?l ) AS ?q ) { ?l property:military_branch resource:anti-aircraft_warfare }
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/P241> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q843941 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P241 wd:Q843941 }
10