private int getHeaderSize() {
    return (int) topScreenModel.getFields().stream().filter(fieldDisplayMap::get).count();
  }
The presentation logic for the top screen.
hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java