Count number of sets with repeats directly