public function count($filter = null)
    {
        try {
            return $this->select('COUNT(*)', $filter)->fetchColumn();
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }