use counts for tab IDs Fixes #36