calculate entry sequence number for the total record
Merge pull request #2 from gewo/fix_totalrecord_entry_sequence_number

calculate entry sequence number for the total record