For example, $\mathbb{Z}_7$ has at least two units, since $2\cdot 4 = 4\cdot 2=1$.
But $\mathbb{Z}_6$ has no units (since nothing multiplies to $7$).
But $\mathbb{Z}_8$ has a unit: $3\cdot 3=1$
So it seems that for $\mathbb{Z}_m$ $($ where $m\in \mathbb{Z})$, if $m+1$ is not prime then $\mathbb{Z}_m$ has units, and if $m+1$ is prime then $\mathbb{Z}_m$ does not have units.
Is this a correct characterization (does it always hold)?