Return the tab count (so that client code may know if all tab were properly closed)