how to count unique entries in database

sorry for the late reply, bee out of office for a few weeks.