I am trying to understand the methods to count congruence classes, typically like$\def\mod{\operatorname{mod}}$ $$\sum_{\substack{x \mod N \\ nx \equiv m \mod d}} \!\!\!\!\!1$$
I would like to assume there is no conditions on $N, n$ and $d$. Intuitively I would like to say that the congruence condition hits a proportion of $1/d$ terms, and that the $x \mapsto nx$ dilatation also sees only a proportion of $1/n$ terms. I would like to imagine that in many cases we have a bound of $N/(nd)$, but I don't know how to write down such a bound.