How many {located in or next to body of water} are for {Moscow} ?
Which ones are located near a body of water around Moscow?
How many are located in or next to a body of water around Moscow?
SELECT ( COUNT ( ?k ) AS ?g ) { resource:Moscow property:located_in_or_next_to_body_of_water ?k }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q649> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P206> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q649 wdt:P206 ?obj }
5