Commit counter is wrong most of the time

Issue #5817 duplicate
Daniel Serodio
created an issue

Most of the repositories on our company's team page are shown with "0 commits", but they do have commits.

Even when it's not zero, it's wrong: this project is shown as having 121 commits when in fact it has 1265 (according to git log | grep -c '^commit').