How to get numbers of the tabs

Hello,I am from China.
I just want to know there is such existing method that get numbers of tabs on tabbar.
Thank you.

Hello,

there isn’t a public method that returns the tabs number. You may try using the following approach :

var count = tabbar._rows[0].tabCount;

it does work.
thank you.

Unfortunately, if you remove tabs after using this method to get the count, it is no longer an active count of tabs. I have a button that, when clicked, gets the count of tabs using this method and then loops through closing all tabs except the main tab. But if I open new tabs after this, and press the button again, the count of tabs is only 1. Is there another way to get the current tab count?

tabCount must be actual after removing as well.

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.