BarButtons don't have built-in support for badges.
You will need to create the image with B4XCanvas and then create a BarButton with this image. Another option is to prepare an image with a red circle (without the number) and use it when needed.
This is a B4i + B4A example. It adds a dynamic badge to the menu icon. It also shows how to update menu items at runtime. Don't miss: 1. B4A - theme settings in manifest editor. 2. B4i - theme settings in main module. Both are not really needed for this example but are useful.