If a number is divisible by 5 and 7, then that number is divisible by LCM(5, 7) = 35. So count the multiples of 35 in the range.
Since
9999 = 35•285 + 24
we know there are 285 multiples of 35 among the positive integers 1-9999. We also have
1000 = 35•28 + 20
so there are 28 multiplies of 35 less than 1000.
Then there are 285 - 28 = 257 multiples of 35 in the given range.