Question: How many prime ministers did the predecessor of Duncan Sandys  serve?
SPARQL:
SELECT DISTINCT COUNT(?uri) WHERE { <http://dbpedia.org/resource/Duncan_Sandys> <http://dbpedia.org/property/successor> ?x . ?x <http://dbpedia.org/property/primeminister> ?uri . }