nObs function

Get the number of observations