2014 AIME I Problem 3

Find the number of rational numbers r, 0<r<1, such that when r is written as a fraction in lowest terms, the numerator and denominator have a sum of 1000 .