I recently noticed that current Compose has LeadingIconTab composable, which is great. But there is no alternative for cases, when I want my icon (or badge) to be trailing. I created my own implementation of tabs view with trailing counters.
Solution is pretty hacky since it uses offsets and raw numbers, but you are free to edit adjusting yourself.