public void forEachTab(BiConsumer<Tab, Integer> callback, boolean skipUnrendered) {
        if (isRepeating()) {
            Tab tab = getDynamicTab();

            int dataCount = getRowCount();
            for (int i = 0; i < dataCount; i++) {
                setIndex(i);

                if (skipUnrendered && !tab.isRendered()) {
                    continue;
                }

                callback.accept(tab, i);
            }

            setIndex(-1);
        }
        else {
            int j = 0;
            for (int i = 0; i < getChildCount(); i++) {
                UIComponent child = getChildren().get(i);
                if (child instanceof Tab) {
                    Tab tab = (Tab) child;

                    if (skipUnrendered && !tab.isRendered()) {
                        j++;
                        continue;
                    }

                    callback.accept((Tab) child, j);
                    j++;
                }
            }
        }
    }
Calculates the count value for the given index.

@param index

@return
primefaces/src/main/java/org/primefaces/component/api/UITabPanel.java