Fix auto-merge code so that rebase will be called

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