Algorithm complexity: $\mathcal O(n\cdot m)$ vs. $\mathcal O(max(n,m)^2)$
This type of $\mathcal{O}$ usage specific to the problem to indicate some other factor plays a role;


in Bucket sort $\mathcal{O}(n \cdot k)$, $k$ is the number of buckets
in Counting sort $\mathcal{O}(k+n)$, $k$ is the range of the inputs.


In the voting case; the $m$ represents the casted ballots, $n$ represent the candidates, and $m \gg n$.


Using $\mathcal{O}(m^2)$ may hide some important factors especially when comparing different algorithms for the same system.
When the candidates are very small, the algorithm will behave like linear. Using $\mathcal{O}(m^2)$ will hide this.


Prefer to use   $\mathcal{O}(n \cdot m)$.