Fix inconsistent number of branches when remote branches are present
Users of project mirrors would see that the number of branches did not match the number in the branch dropdown because remote branches were counted when Rugged was in use. With Gitaly, only local branches are counted.
Closes #36934 (closed)