Here is an example:
I have several blue cars, red cars etc. in the DB (field "color"), each car is a record. Now a script should tell me how many different colors I have, i.e. 3 if all cars are either blue, red or green, and 2 if they are either blue or red, no green cars.