/** * Возвращает количество элементов * * @return int */ public function count() : int { if ($this->count === null) { $this->count = $this->loader->fetchCount($this->specification); } return $this->count; }