This question was initially proposed to me by two friends. Given an integer $n$, how many isomorphism classes are there for semidirect products $\mathbb{Z}/n\mathbb{Z}\rtimes\mathbb{Z}/2\mathbb{Z}$?

Maybe this is a really trivial question. I can tell that a semidirect product is the same as an integer $r\in\mathbb{Z}/n\mathbb{Z}$ with $r^2=1\mod[n]$, but are there isomorphisms between some of them? What happens for instance when n is squarefree, thus the product of fields.