How many {place of detention} are to/by {gulag} ?
Which is the number of places of detention that are there in gulag?
How many places of detention are by gulag?
SELECT ( COUNT ( ?i ) AS ?t ) { ?i property:place_of_detention resource:Gulag }
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/Q161448 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P2632 wd:Q161448 }
3