At first thought, the question might appear to be stupid but at least for me it isn't. Note that the question asks the number of integers between two "real" numbers.
Number of integers between $1.0$ and $3.1$ is two! Difference = $2.1$
Number of integers between $1.9$ and $3.1$ is two! Difference = $1.2$
Number of integers between $1.99 and 2.9$ is one! Difference = $0.91$
Number of integers between $1.0$ and $1.91$ is zero! Difference = $0.91$
Note that there is no pattern.
How can the number of integers between two real numbers be found?
*Accepting solutions which take different cases to solve the problem.
Optional - not related directly to the question (source of the problem):
Find the values of $a$, for which the quadratic expression $ax^2 + (a - 2)x -2$ is negative for exactly two integral values of $x$.
Of course, one who can spot that $-1$ is a root of the equation for any given value of the parameter $a$ can solve it without issues.
But what about in a general case where the root depends on the parameter itself?
My approach to solve the problem was as follows. Firstly, a has to be a positive integer if not, there would be infinitely many integers where the expression would turn out to be negative.
Since $a > 0$, the parabola would be open upwards (convex from bottom and concave from the top). The points were the graph intersects the $x$-axis are the roots of the equation. Any real value which lies between the roots when substituted in the expression would evaluate to a negative real number (obvious from the graph).
Hence, the above problem reduces to finding number of integers between the roots (which can be real) of the equation.
This would mean, the answer to the question of finding the number of integers between two real numbers should be such that conditions can be imposed.
If $p(x, y)$ was the function which gives number of integers between two real numbers $x$ and $y$ then I should be able to write it in the form, $p(x) = 2$ and solve for the range of values of $a$ where it holds good. ($x$ and $y$ are given in terms of the parameter $a$)