a better way to count commits