query: SELECT ?item (SUM(?act_) as ?audiocount) (SUM(?pct_) as ?pronunciationcount)
  WITH {
    SELECT ?item (count(DISTINCT ?form) as ?pct) WHERE {
      ?l ontolex:lexicalForm ?form ; dct:language ?item .
      { ?form wdt:P898 ?ipa1 . } UNION { ?form p:P7243/pq:P898 ?ipa2 .}
    } group by ?item
  } AS %pcts
  WITH {
    SELECT ?item (count(DISTINCT ?form) as ?act)  WHERE {
      ?l dct:language ?item ; ontolex:lexicalForm ?form .
      { ?form wdt:P443 ?audio . } UNION { ?form p:P7243/pq:P443 ?audio . }
    } group by ?item
  } AS %acts
  WITH {
    SELECT ?item ?pct_ ?act_ {
      { INCLUDE %pcts } UNION { INCLUDE %acts. }
      BIND(IF(BOUND(?pct),?pct,xsd:integer(0)) as ?pct_)
      BIND(IF(BOUND(?act),?act,xsd:integer(0)) as ?act_)
    }
  } AS %unionthereof
  WHERE {
    INCLUDE %unionthereof.
  }
  GROUP BY ?item order by desc(?audiocount) desc(?pronunciationcount)