check allSeqNumbers in memory instead of db count