Count rows by group
Counts rows in a DataFrame, optionally by selected columns or existing group keys.