Count items from Repeatable Group

Is it possible to get a count or sum of items, from either a Repeatable Group or by performing a Search for items that meet specific criteria?

I’m trying to build charts to show information based on all open tasks in a database. For example, I’d like to show a count of all open tasks in each category in a bar chart, with the category along the X axis and count along the Y axis. What’s the best way to count or sum these items?

You can use the count function after a search for. Example: search for all people who like apples:count