get_n_chunks function

Get the number of chunks/sequences for each case