Commit count missing on MR creation page for very large MRs

Description

The merge request creation page currently does not show a commit count for very large merge requests (100K+ commits) due to performance issues.

This is a follow-up to issue #576241 (closed), where such MRs were erroring with a 500. This was resolved with !210440 (merged), but the problem persists that the commit count will be missing.

Goal

Optimize the performance of commit count calculation and display on the MR creation page so the count can be shown again without impacting page load times.

Proposal

TBD.

Maybe we could fallback on the frontend count?

Edited by François Rosé