query: SELECT  ?gender ?genderLabel (count(*) as ?count)
  WHERE
  {
  	?item wdt:P31 wd:Q5 .
  	?item wdt:P21 ?gender .
      FILTER ( ?gender != wd:Q6581072 )
      FILTER ( ?gender != wd:Q6581097 )
      FILTER (! isBLANK(?gender)) .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }  
  }
  GROUP BY ?gender ?genderLabel
  ORDER BY DESC(?count) ASC(?gender)