Change the command to count the number of commits so that it works with no commit