PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?module (COUNT(?c) AS ?classes) WHERE {
?c a owl:Class .
FILTER(STRSTARTS(STR(?c), "http://www.irisa.fr"))
BIND(REPLACE(STR(?c), "^.*/([a-z-]+)-owl-lite.*$", "$1") AS ?module)
} GROUP BY ?module ORDER BY DESC(?classes)