Wrote function to count the number of clusters in a file