model_get_n function

Get the number of observations