How many {home port} are to/by {Murmansk} ?
What are the number of ports in Murmansk?
How many ports are in Murmansk?
SELECT ( COUNT ( ?k ) AS ?y ) { ?k property:home_port resource:Murmansk }
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/P504> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> http://wikidata.dbpedia.org/resource/Q1763 .
} 

SELECT (COUNT(?sub) AS ?value ) { ?sub wdt:P504 wd:Q1763 }
13