It is an important theorem that a number b between 0 and m-1 has a mod m multiplicative inverse if b is relatively prime to m. Thus if m is prime, the only number between 0 and m-1 that does not have a mod m multiplicative inverse is 0.
For example, take m=7. We saw that the numbers 1, 2, 3, 4, 5, and 6 all have mod 7 multiplicative inverses.
Now consider for example m=15. The numbers from 0 to 14 that have common divisors with 15 are 0, 3, 5, 9, and 10. These numbers do not have mod 15 multiplicative inverses. All the rest do.
We recall from the Number Theory handout that is the number
of numbers from 0 to m-1 that are relatively prime to m.
Combining this fact with our knowledge about multiplicative inverses,
we conclude that
equals the number of numbers from 0 to
m-1 that have mod m multiplicative inverses. As discussed in the
Number Theory handout, for big p and q, the difference between
and pq is relatively insignificant. If you chose a random
number between 0 and pq-1, it would most likely be a number that
does have a mod pq multiplicative inverse.