An alternative is to allow Blender to work voodoo on the new group name then read it back…
group_name = 'Group'
group = bpy.data.groups.new(group_name)
actual_group_name = group.name
Run the above code a few times and you will see a number of new groups created called Group, Group.001, Group.002, etc. The group names increment, but the script always has access to the actual_group_name of the last-created group.
The script creates a group asking for a name to be given to it, but if this name is already taken then Blender will increment the number and give the new group a name+number. If a reference to the group is stored when the script creates the group, it is possible to read back the actual name after the group has been created and see what name Blender has actually given to the group (as I do in the code above… this code looks small but runs quite well).