adding option to sort by count