nfam function

Count the number of families in the data