How many {armament} are to/by {pistol} ?
What is the number of armaments that are pistols?
How many armaments are pistols?
SELECT ( COUNT ( ?w ) AS ?c ) { ?w property:armament resource:pistol }
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/P520> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q1907525 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P520 wd:Q1907525 }
24