Added generator to calculate the total number of commits in the repository.