How many {place of detention} are to/by {Danube – Black Sea Canal} ?
What number of prisons are by the Black Sea Canal?
How many prisons are by the Black Sea Canal?
SELECT ( COUNT ( ?m ) AS ?b ) { ?m property:place_of_detention resource:Danube_–_Black_Sea_Canal }
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/P2632> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q592260 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P2632 wd:Q592260 }
5