final public function count(): int
    {
        // If size if known, return it
        if (isset($this->size)) {
            return $this->size;
        }

        // Calculate, cache and then return the size
        return $this->size = count($this->data);
    }