How many positive integers less than $1998$ are relatively prime to $1547$? (Two integers are relatively prime if they have no common factors besides 1.)

Let's think step by step and output the final answer within \boxed{}.
user