I don't understand the question but maybe looking at the simple graphs of x^2 and x^3 can answer your question. The domain of x^2 is all real numbers but its range is all nonnegatives while that of x^3 is all real numbers and so is its range.
According to intermediate value theorem if f is continuous on interval I , a,b belongs to I and f(a) doesn't equal to f(b),then f takes any value between f(a) and f(b) in a point between a and b. My question is : is it possible that f takes each value in an infinite number of
I mean regarding your example x^2 takes 1 in -1 or 1 (-1 & 1 belongs to (a,b) ) 2 points . On the other hand sin (x) takes 1 in pi/2, 5pi/2,9pi/2, 3 points . (all belongs to supposed (a,b).f(x)=xsin(1/x) x#0 ,f(0)=0 assuming (a,b)=(-2,2) takes 0 in infinite numbers of points .My question is:is it possible that all range value be taken in infinite points such as the last example?