n_sets function

Get the number of sets in he input