You know how many numbers are in 1+2+3+4+...+997, the answer is of course 997. Comparing your sequence to this one, you're essentially removing every other number, so you have 1, remove 2, then 3, remove 4 etc. all the way up to 995, remove 996. Up to that point you have removed half the numbers, so you have 996/2 = 498 numbers. You also have 997, so the total number of terms in the sequence is 499.