How many {penalty} are to/by {capital punishment} ?
What includes capital punishment?
How many penalties can include capital punishment?
SELECT ( COUNT ( ?q ) AS ?r ) { ?q property:penalty resource:capital_punishment }
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/P1596> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q8454 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P1596 wd:Q8454 }
901