Show that Y is a finite set

Let X and Y be sets satisfying Y$\displaystyle \subset$X$\displaystyle \subset$(-$\displaystyle \infty$,$\displaystyle \infty$). Suppose that X is compact and that for every x$\displaystyle \in$X, there is a neighborhood of x which contains only a finite number of points of Y. This number may vary with x. Show that Y is a finite set.

What I have so far is that since X is compact it is closed and bounded and since it is closed there is an accumulation point in each neighborhood of X. then the neighborhood contains the point (x-$\displaystyle \epsilon$,x+$\displaystyle \epsilon$. And the Ix's are open sets that contain X.

I'm not sure what to do next and/or how to actually do the proof of it, hope someone can help. thanks