get_n_solutions function

Get the number of intermediate solutions