query: # Australian women artist with institution count
  
  SELECT ?artist ?artistLabel (COUNT(?institution) as ?countInstitution) with { select distinct ?artist WHERE 
  {
     ?artist wdt:P106 ?occ.
     VALUES ?occ {wd:Q483501 wd:Q11569986 wd:Q1028181 wd:Q1281618}    # occupations
     ?artist wdt:P31 wd:Q5.             # is human
     ?artist wdt:P21 wd:Q6581072.       # is female
     ?artist wdt:P6379/wdt:P131* wd:Q408.    # has work in institution in Australia
     hint:Prior hint:gearing "forward".
  } } as %i where
  {
    include %i
    ?artist wdt:P6379 ?institution.    # has works in ?institution
    ?institution wdt:P131* wd:Q408.    # institution in Australia
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  }
  GROUP BY ?artist ?artistLabel
  ORDER BY DESC (?countInstitution)