/** * Returns result of the count * * @return int */ public function count() { if ($this->count === null) { $this->count = $this->adapter->num_rows($this->result); } return $this->count; }