Python >=3.5, 6476 64 58 bytes
Thanks to LeakyNun for golfing off 12 (!) bytes.
Thanks to Sp3000 for golfing off 6 bytes.
import math
lambda n:sum(math.gcd(n,x)<2for x in range(n))
I love how readable Python is. This makes sense, even through the golfedness.