read and return nmber of checkpoints