How many {contains administrative territorial entity} are to/by {Toulon} ?
Toulon contains what number of administrative territorial entities?
How many administrative territorial entities are contained by Toulon?
SELECT ( COUNT ( ?t ) AS ?r ) { ?t property:contains_administrative_territorial_entity resource:Toulon }
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/P150> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q44160 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P150 wd:Q44160 }
7