This document introduces counting and grouping large datasets. It discusses how to compute statistics on data when the full dataset exceeds memory capacity. It presents three approaches to grouping data: loading the full dataset into memory, streaming to process one observation at a time, and storing per-group histograms. The approaches vary in the types of statistics that can be computed based on the number of observations, groups, and distinct values within each group.