num_clusters function

Get the number of clusters.