Use count instead of split to count commits

string.split will return a list with one element (the original string) if the delimiter is not found

fix issue #62
Merge pull request #92 from kristi/rebase-bugfix

Fix auto-merge code so that rebase will be called