Adds the number of commits into a variable

Adds the number of commits into a variable