public function count() { $total = $this->runner->getCachedTotal($this->query); if (null === $total) { $total = $this->runner->total($this->query); $this->runner->setCachedTotal($this->query, $total); } return $total; }