I found this assertion in a proof of the number of unique solutions of $ax \equiv b \mod m$ with $\gcd(a,m) \mid b$:
The page is here: http://sites.millersville.edu/bikenaga/number-theory/linear-congruences/linear-congruences.html
Let $d = \gcd(a, m)$
Let $d' = \gcd\left(m, \frac{m}{d}\right)$
Show $d' = \frac{m}{d}$.
Clearly, $d' \leq \frac{m}{d}$
But now I'm stuck.
You can find the proof like the following: $$m = dz \Rightarrow z = \frac{m}{d} \Rightarrow \gcd\left(m, \frac{dz}{d}\right) = \gcd(m, z) = \gcd(dz, z) = z = \frac{m}{d}.$$