src/orm/classes/Table.php
public function count(ezcQuerySelect $query = null)
    {
        $q = $query ? $query : $this->createCountQuery();
        $raw = $q->fetch();
        if ($raw)
        {
            return $raw['record_count'];
        }
        return 0;
    }
public function count(ezcQuerySelect $query = null)
    {
        $q = $query ? $query : $this->createCountQuery();
        $raw = $q->fetch();
        if ($raw)
        {
            return $raw['record_count'];
        }
        return 0;
    }
Возвращает количество записей

@param ezcQuerySelect $query

@return int

@since 1.00