query: # total number of sister cities per country
  SELECT ?country ?countryLabel ?cityCount WITH {
    SELECT ?country (COUNT(?sisterCity) AS ?cityCount) WHERE {
      ?city wdt:P17 ?country;
            wdt:P190 ?sisterCity.
    }
    GROUP BY ?country
  } AS %results WHERE {
    INCLUDE %results.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }
  ORDER BY DESC(?cityCount)