Question: From how many coutries do companies come, which are headquartered in the Klang Valley?
SPARQL:
SELECT DISTINCT COUNT(?uri) WHERE { ?x <http://dbpedia.org/property/headquarters> <http://dbpedia.org/resource/Klang_Valley> . ?x <http://dbpedia.org/property/country> ?uri . ?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Country>}