add prev log, and add prev total to total count.