Question: In how many countries does the Zurich Affoltern am Albis Zug line go?
SPARQL:
SELECT DISTINCT COUNT(?uri) WHERE { ?x <http://dbpedia.org/property/line> <http://dbpedia.org/resource/Zürich–Affoltern_am_Albis–Zug_railway_line> . ?x <http://dbpedia.org/ontology/country> ?uri  . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Country>}