query: SELECT ?item
    (COUNT(DISTINCT ?p) as ?count)
    (SAMPLE(?p) as ?sample_p)
  {
      ?item wdt:P407 wd:Q7737 ;
            wdt:P31/wdt:P279? wd:Q101352.
      FILTER NOT EXISTS { ?item wdt:P282 wd:Q8209 }
      FILTER NOT EXISTS { ?item wdt:P282 wd:Q187846 }
      OPTIONAL { ?p wdt:P734 ?item }
  }
  GROUP BY ?item
  ORDER BY DESC(?count) ?item