Can someone help me with this?

I want to use a formula that will look at an array of cells and tell me how many unique values there are.

For example, in the array below, the answer would be 4.

A
A
A
B
B
C
C
C
C
D
D

Is there an easy formula for this?