This can be used as a column aggregate function with ‘Column’ as input, and returns the number of items in a group.
count(x) count(groupBy(df, "name"))