public function getContentsWithCollectionsCount()
    {
        $query = $this->connection->createQueryBuilder();
        $query->select(
                'COUNT(DISTINCT eic.contentobject_id) AS count'
            )
            ->from($this->connection->quoteIdentifier('ezinfocollection'), 'eic')
            ->innerJoin(
                'eic',
                $this->connection->quoteIdentifier('ezcontentobject'),
                'eco',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eic.contentobject_id'),
                    $this->connection->quoteIdentifier('eco.id')
                )
            )
            ->leftJoin(
                'eic',
                $this->connection->quoteIdentifier('ezcontentobject_tree'),
                'ecot',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eic.contentobject_id'),
                    $this->connection->quoteIdentifier('ecot.contentobject_id')
                )
            );

        $statement = $query->execute();

        return (int)$statement->fetchColumn();
    }