replaced hardcoded origin/{branch-name} with @{upstream} which gets the upstream branch since git 1.7.0
added new function to get number of commits ahead of remote