How many {constellation} are for {Milky Way} ?
The milky way has how many constellations?
How many constellations are there in the Milky Way?
SELECT ( COUNT ( ?m ) AS ?w ) { resource:Milky_Way property:constellation ?m }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q321> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P59> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q321 wdt:P59 ?obj }
22