Properly count the number of commits (was off-by-one because of a newline)

Change-Id: I2661bbd161886c203c79c6ae6b607b73ef757729