There are a number of different methods listed [here](http://en.wikipedia.org/wiki/Determining_the_number_of_clusters_in_a_data_set)