select implementer.object_name as implementer, count(distinct model.object_id) as PublicModels from objects model,
objects implementer , eav_objects implementedby where model.object_class=19 and
implementer.object_class=91 and
implementedby.attribute_id=299 and
implementedby.object_id=model.object_id and
implementedby.value_=implementer.object_id and
model.private=0 group by
implementer.object_name order by
count(distinct model.object_id) desc