/** * Get the number of results * * @return int */ public function getCount() { if (is_null($this->count)) { $this->count = count($this->table->select($this->getQuery())); } return $this->count; }