determine the number of clusters