replay(): get line count from the data file according to checkpint.