Show commit count for current branch/ref on project commits page
Previously the badge would show the number of commits for the primary branch in the project. Now it shows the commit count for the branch/tag/ref currently being viewed.
Previous behavior: (master branch had 594 commits)
New behavior:
Relevant issues: #2532 (closed) #2802 (closed)