Counting Lattice Rectangles in $O(n\log n)$ Operations | Digital Library | PAMCET | PAMCET