FREQUENCY
Statistical

Returns a frequency distribution as a vertical array

Syntax:

=FREQUENCY(data_array, bins_array)

Example:

=FREQUENCY(A2:A10, B2:B5)