public function count($column = NULL) { if (!$column) { $this->execute(); return count($this->data); } return $this->aggregation("COUNT({$column})"); }
/** * @return int */ public function getCount() { if ($this->count === NULL) { $column = !$this->source->getPrimary(FALSE) ? '*' : $this->source->getPrimary(); $this->count = $this->source->count($column); } return $this->count; }