I have grouped some fields in my Airtable. How can I get a specific “count” or a “sum” with API?

How can I access this data through API? I am interested in getting the different counts and sums for each group. I.e: Score_act: sum 41 Task: “Jeg har koblet av med noe underholdende”: count 4 (times this task had been completed).
Is this possible?
Regards,
Tor M
