is there any way to count rows by group?

is there any way to count rows by group?

I want something returning like this:

{
“Group_1: 38,
“Group_2: 19,
“Group_3: 20
}
Was this page helpful?