count the number of unique topics