The FRONTBROWSERTABCOUNT() function (v8+) returns the number of tabs in the front browser (the most recently front web browser of Safari or Google Chrome).