public function getEntitiesFromCount(array $options = array()) { $options['selects'][] = "COUNT(e.guid) as total"; $options['group_by'] = 'r.guid_two'; $options['order_by'] = 'total desc'; return $this->getEntities($options); }