Let $S=[0,1)^2$ and $m,n$ are positive integers and $p/q,r/s$ are positive rationals with $p/q<r/s$. What is the limit $$\lim\limits_{(x,y)\to(1,1),\ (x,y)\in S}(1-x^py^q)(1-x^ry^s)\sum_{p/q\le m/n\le r/s}x^my^n?$$
The answer is $qr-ps$. Interesting this is the determinant of matrix $\begin{pmatrix} r & s \\ p & q \end{pmatrix}$. The sum $\sum_{p/q\le m/n\le r/s}x^my^n$ also seems to be of the form
$-1+(1+(x^ry^s)+(x^ry^s)^2+\cdots)(1+(x^py^q)+(x^py^q)^2+\cdots)P(x,y),$
where $P(x,y)$ is a polynomial with $qr-ps$ terms, and each term $x^ay^b$ correspond to the lattice point $(a,b)$ inside the paralleogram spanned by $(p,q)$ and $(r,s)$. In other words, $(a,b)=u(p,q)+v(r,s)$ where $0\le u,v<1$, $u,v\in\mathbb{Q}$. But I don't know how to prove the number of lattice points is the determinant.
First the surface of a parallelogram generated by two vectors $(p,q)$ and $(r,s)$ is (eventually up to a minus sign) equal to the determinant $$\det\begin{pmatrix} p&r\\ q&s \end{pmatrix}=ps-qr\,.$$ Now let us count the number of lattice point in this parallelogram and see that it is equal to the surface of the parallelogram.
Then I would like to precise how we count the points of the lattice:
Since a complete formal proof would be a bit boring and not that enlightening let's understand the principle on a picture.
Let's look at a lattice point $(m,n)$ which is in the parallelogram, and consider the square with vertices $(m,n)$, $(m+1,n)$, $(m+1,n+1)$,$(m,n+1)$.
Remark 1: In fact the square 2 corresponds to four squares, but I did not represent the fourth one with lower-left corner $(p+r,q+s)$ as it would have contributed to zero in the area. But it is important when one counts the corresponding points in the lattice.
Remark 2: I slightly cheated: Other cases can occur when the parallelogram is very flat, but one can adapt the method, but with more translations.