git-codereview: fix branch "behind" count

git-codereview pending's count of how far behind a branch is is
currently wrong. It computes this from the length of the string
printed by git log --format=format:x, but forgets that git log
automatically adds new lines between each commit. As a result, given
that the true count is n, git pending prints 2n-1.

Fix this by counting the number of lines printed by git log, not the
number of characters.

Change-Id: I5702a833d34333099cad7d88c03837088ac4f9a8
Reviewed-on: https://go-review.googlesource.com/17771
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed