I have the following sample data:
test={{{2020, 1, 1}, Brazil}, {{2020, 1, 2}, Brazil}, {{2020, 1, 1}, Brazil}, {{2020, 2, 1}, Brazil}, {{2020, 1, 1}, Brazil},{{2019, 1, 1}, Brazil}}
I would like to first group the data by month and year, and then count how many entries are in each group.
I would like the output to look something like this:
<|{{2020, 1},4}, {{2020, 2},1},{{2019, 1},1}|>