I would like to get the number of different values found in a List.
For example:
The output for the List a={1,2,3,4,5} would be 5 whereas it would b
a={1,2,3,4,5}
Length[DeleteDuplicates[a]]
would do the trick. Depending on what else you're going to do, you could use Union or Tally instead of DeleteDuplicates.
Union
Tally
DeleteDuplicates