    }
    tab_charts.erase(id);
    tabbar->removeTab(index);
  }
  
  void ChartsWidget::eventsMerged() {
    QFutureSynchronizer<void> future_synchronizer;
    for (auto c : charts) {
      future_synchronizer.addFuture(QtConcurrent::run(c, &ChartView::updateSeries, nullptr));
 
</s> remove   for (int i = 0; i < tabbar->count(); ++i) {
    tabbar->setTabText(i, QString("Tab %1").arg(i + 1));
  }
 </s> add 
  updateTabBar();
}

void ChartsWidget::updateTabBar() {
  for (int i = 0; i < tabbar->count(); ++i) {
    const auto &charts_in_tab = tab_charts[tabbar->tabData(i).toInt()];
    tabbar->setTabText(i, QString("Tab %1 (%2)").arg(i + 1).arg(charts_in_tab.count()));
  }
    }
    tab_charts.erase(id);
    tabbar->removeTab(index);
  updateTabBar();
}

void ChartsWidget::updateTabBar() {
  for (int i = 0; i < tabbar->count(); ++i) {
    const auto &charts_in_tab = tab_charts[tabbar->tabData(i).toInt()];
    tabbar->setTabText(i, QString("Tab %1 (%2)").arg(i + 1).arg(charts_in_tab.count()));
  }
  }
  
  void ChartsWidget::eventsMerged() {
    QFutureSynchronizer<void> future_synchronizer;
    for (auto c : charts) {
      future_synchronizer.addFuture(QtConcurrent::run(c, &ChartView::updateSeries, nullptr));
keep keep add keep keep keep keep keep keep
 cabana: display chart count in tab (#27853)

display chart count in tabbar 
tools/cabana/chart/chartswidget.cc