scripts/getver.sh: avoid use of git rev-list --count