nobs function

Extract the number of observations