Counting rows per group is so common that dplyr has a shortcut: count(category) is group_by(category) |> summarise(n = n()). Add sort = TRUE to put the biggest groups first, and name several columns to count combinations.
count() counts rows. To add up a column instead, give it as a weight: count(category, wt = units) totals the units in each category.
distinct() keeps one row for each different value, or combination of values, of the columns you name: distinct(region, channel) lists the pairs that occur. n_distinct() counts different values inside summarise(). Both treat NA as a value of its own.
Rows per group, units per group, and the combinations that occur.