How many {contains administrative territorial entity} are to/by {Metz} ?
How many administrative territorial entities does Metz have?
SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P150 wd:Q22690 }
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/Q22690 .
} 

In regards to Metz, how many administrative territorial entities are there?