public function getTotalRowsCount() { if ($this->totalRowsCount) { return $this->totalRowsCount; } $this->totalRowsCount = $this->cursor->count(); return $this->totalRowsCount; }