determine nb of clusters