def METHOD_NAME(self, n_iter):
    try:
        segcount = self._segcount_by_iter[n_iter]
    except KeyError:
        segcount = self.data_manager.get_iter_group(n_iter)['seg_index'].shape[0]
        self._segcount_by_iter[n_iter] = segcount
    return segcount