This is not possible using SharePoint out of the box capabilities as there is no configuration setting to hide the count of grouping.
Documentation: Use grouping to modify a SharePoint view
You will need custom solution for this using SharePoint framework.
One way to achieve this is using Application customizer SPFx extension to inject custom CSS in your modern page and hide the grouping item count.
Reference: Inject Custom CSS on SharePoint Modern Pages using SPFx Extensions
Update from comments:
This is now possible using SharePoint JSON formatting. Try using below JSON code in View formatting settings:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"groupProps": {
"headerFormatter": {
"elmType": "div",
"txtContent": "@group.fieldData"
}
}
}