SELECT ?tag (count(distinct ?tag) as ?count) WHERE { ?r ns9:taggedWithTag ?tagresource. ?tagresource ns9:name ?tag } LIMIT 5000