How many {licence plate code} are for {Piraeus} ?
Piraeus has how many license codes?
How many license plate codes are there for Piraeus?
SELECT ( COUNT ( ?y ) AS ?c ) { resource:Piraeus property:licence_plate_code ?y }
SELECT (COUNT(?obj) AS ?objs ) {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q58976> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P395> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
} 

SELECT (COUNT(?obj) AS ?value ) { wd:Q58976 wdt:P395 ?obj }
8