We present an algorithm to answer a set
Q of range counting queries over a point set
P in
d dimensions. The algorithm takes

I/Os and uses linear space. For an important special case, the α(∣
P∣) term in the I/Ocomplexity of the algorithm can be eliminated. We apply this algorithm to constructing
t-spanners for point sets in ℝ
d and polygonal obstacles in the plane, and finding the
K closest pairs of a point set in ℝ
d.