def METHOD_NAME(self, parent=None) -> int:
    if parent is None:
        parent = QModelIndex()
    if parent.isValid():
        return 0
    source_index = self._get_source_parent_index()
    if not source_index.isValid():
        return 0
    return self.sourceModel().METHOD_NAME(source_index)