Question: Count the number of offices held by people who have their allegiances with the american civil war union?
SPARQL:
SELECT DISTINCT COUNT(?uri) WHERE { ?x <http://dbpedia.org/property/allegiance> <http://dbpedia.org/resource/Union_(American_Civil_War)> . ?x <http://dbpedia.org/property/office> ?uri . }