Try this array formula**:

=SUM(IF(FREQUENCY(IF(C2:C10<>"",A2:A10),A2:A10),1))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.