First use the UNIQUE formula to list out unique values. Then using the COUNTIF function you can count the occurrences of these unique values.