Groovy map – group and sum by two keys

I have this data

Country:"USA", Gender:"Male", Count:100
Country:"USA", Gender:"Male", Count:300
Country:"USA", Gender:"Female", Count:200
Country:"USA", Gender:"Non-binary", Count:50
Country:"France", Gender:"Male", Count:10
Country:"France", Gender:"Female", Count:30
Country:"France", Gender:"Female", Count:10

As you can see, I have several lines with the same combination of Country & Gender.

I need to create a new map – group Country & Gender and sum the Count for this group.

I can arrange the map as I wish –

[Country:"USA", Gender:"Male", Count:100] 
[[Country:"USA", Gender:"Male"]:100]]

My Questions:

  1. How to best create the map for grouping
  2. How to sum the groups