number of records functionality