This should be possible with the use of the tab container:
If you open up the properties of the Tab page (not the container itself) there is a radio button labeled show badge.
This property allows you to pass data using placeholders that reference attributes from the enclosing entity. You will need to place this tab container in a dataview or other context entity for the data to be accessible by the tab container's badge. I would suggest creating a non-persistent entity in a data source microflow (where you also can count the number of records you have and set this onto the new entity to be displayed in the badge).
Hope this helps,