Using the DISTINCT keyword

DISTINCT keyword eliminates duplicate rows from the result set.

SELECT DISTINCT state FROM authors

To count the number of rows returned to the client by the above-mentioned query

SELECT COUNT(DISTINCT state) AS NUMBER_OF_ITEMS FROM authors