query: SELECT ?item (COUNT(?item) as ?count) WHERE {
    ?painting wdt:P31 wd:Q3305213 . 
    ?painting wdt:P136  wd:Q21074330. 
    ?painting wdt:P180 ?item . 
  OPTIONAL {  ?item wdt:P18 ?pic. }
  } GROUP BY ?item HAVING (?count > 2)
  ORDER BY DESC(?count)