Considering the following example:
To get the unique values, and the occurrences of each unique value, you can do the following:
The image is tiny, so here is are the formulas to type-in and drag down:
FORMULAS
1. Type in the first cell of column B:
=IF(ISERROR(INDEX($A$2:$A$8,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$8),0,0),0))),"",INDEX($A$2:$A$8,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$8),0,0),0)))
Drag the formula down the column B. You will get a list of unique values.
2. Type in the first cell of column C:
=COUNTIF($A$2:$A$8,B2)
Drag the formula down the column C. You will get the number of occurrences of each unique value.
RESULT
This is what you will get:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…