query: SELECT ?item ?linkcount 
  WHERE
  {
    ?item wdt:P195 wd:Q682827 .
    ?item wdt:P217 ?inv .
    ?item wikibase:sitelinks ?linkcount .
    FILTER (?linkcount > 0)
  }
  GROUP BY ?item ?linkcount 
  ORDER BY DESC(?linkcount)