restrict_n function

Remove or flag groups with n less than some number