Okay let's see what happens here.
It took me 20 seconds to understand what the question was precisely asking for. But this is the most important step; do not attempt anything if you don't understand throughly the question.
What I figured is that the definition of "relatively prime" was pretty close to the description assigned to the question.
Two different numbers are said to be relatively prime whenever their GCF=1.
Let's pick a random example: how many numbers less than 105 are relatively prime to 105?
105=3(5)7 then the total number of relatively primes will be: 105(1-1/3)(1-1/5)(1-1/7)=48
Let's apply the same logic to our question and consider a random prime number: p(1-1/p)= p-1 which turns out to be the correct answer.
learn the rules of the game, then play better than anyone else.