Automatically finding the number of clusters based on simulated annealing