Count the number of distinct names associated with the photos.
select count(distinct name) from photos