def subtreeCount(self, doc, includeItems=True, user=None, level=None):
        count = 1
        folders = self.model('folder').find({
            'parentId': doc['_id'],
            'parentCollection': 'user'
        }, fields=('access',))

        if level is not None:
            folders = self.filterResultsByPermission(
                cursor=folders, user=user, level=level)

        count += sum(self.model('folder').subtreeCount(
            folder, includeItems=includeItems, user=user, level=level)
            for folder in folders)
        return count
Return the size of the user's folders.  The user is counted as well.
dataset/ETHPy150Open girder/girder/girder/models/user.py/User.subtreeCount