Let $\mathbf{x} = (x_1, \cdots, x_n)$, and consider a rational function $F : \mathbb{R}^n \rightarrow \mathbb{R}$ be given by
$$\displaystyle F(\mathbf{x}) = \sum_{i = 1}^m \frac{Q_i(x_1, \cdots, x_{n-1})}{R_i(x_1, \cdots, x_{n-1})} x_n^i,$$
where $Q_i, R_i$ are non-constant polynomials with integer coefficients. Moreover we may assume that $R_i > 0$ for all $\mathbf{x} \in \mathbb{R}^n$, so $F$ is well-defined everywhere.
I am trying to understand the counting function
$$N_F(X) = \# \{\mathbf{x} \in \mathbb{Z}^n : \lVert \mathbf{x} \rVert_\infty \leq X, F(\mathbf{x}) \in \mathbb{Z} \}.$$
In particular, given $x_1, \cdots, x_{n-1}$ one can always find $x_n \in \mathbb{Z}$ such that $F(\mathbf{x}) \in \mathbb{Z}$, but the smallest possible choice of such $x_n$ could very well be extremely large. Thus it is perhaps best to consider all of the $x_i$'s as varying at once.
The above observation also gives a somewhat straightforward upper bound for $N_F(X)$. In particular, having chosen $x_1, \cdots, x_{n-1}$ the resulting function $f(x) = F(x_1, \cdots, x_{n-1}, x)$ is then a rational polynomial in a single variable, and we can clear its denominator to obtain $g(x)$ say, and then the question is equivalent asking for the density of $x \in [-X,X]$ such that $g(x)$ satisfies a certain congruence. However the modulus, equal to $\text{LCM}_{1 \leq i \leq m} R_i(x_1, \cdots, x_{n-1})$ is typically much larger than $X$, since the $R_i$'s are assumed to be positive definite and in particular not linear. Therefore usually there is at most one root of $g(x)$ in $[-X,X]$. It thus follows that $N_F(X) = O\left(X^{n-1}\right)$. I am looking for a bound that beats this, and perhaps close to what one might expect to be the exact asymptotic order.