  A Diophantine $m$-tuple is a set $A$ of $m$ positive integers such that
$ab+1$ is a perfect square for every pair $a,b$ of distinct elements of $A$. We
derive an asymptotic formula for the number of Diophantine quadruples whose
elements are bounded by $x$. In doing so, we extend two existing tools in ways
that might be of independent interest. The Erd\H os-Tur\'an inequality bounds
the discrepancy between the number of elements of a sequence that lie in a
particular interval modulo 1 and the expected number; we establish a version of
this inequality where the interval is allowed to vary. We also adapt an
argument of Hooley on the equidistribution of solutions of polynomial
congruences to handle reducible quadratic polynomials.
