public function countAllContents($contentVisibility = true)
    {
        $children = FolderQuery::findAllChild($this->getId());
        array_push($children, $this);


        $query = ContentQuery::create()->filterByFolder(new ObjectCollection($children), Criteria::IN);

        if ($contentVisibility !== '*') {
            $query->filterByVisible($contentVisibility);
        }

        return $query->count();
    }