The main result is an estimate for the number P(r) of relatively prime pairs (a, b) of integers within a contour. When specialized to the contour x(2) + y(2) = r this estimate gives P(r)= (6/pi)r + (without the RH, O-epsilon(r(1/2)exp(-(log r)((3/5)+epsilon))) or with the RH O(epsilon)r((51+epsilon)/100)). A similar estimate, with the same sort of error, is obtained for the number of relatively prime pairs (a,b) of positive integers so that ab less than or equal to r. The error term for a general contour depends on the maximal value of the radius of curvature of the bounding contour.