Let D be the ring of S-integers in a global field and D its profinite completion. Given X ⊆ D n , we consider its closure X ⊆ D n and ask what can be learned from X about the "size" of X .In particular, we ask when the density of X is equal to the Haar measure of X . We provide a general definition of density which encompasses the most commonly used ones. Using it we give a necessary and sufficient condition for the equality between density and measure which subsumes a criterion due to Poonen and Stoll. We also show how Ekedahl's sieve fits into our setting and find conditions ensuring that X can be written as a product of local closures. In another direction, we extend the Davenport-Erdős theorem to every D as above and offer a new interpretation of it as a "density=measure" result. Our point of view also provides a simple proof that in any D the set of elements divisible by at most k distinct primes has density 0 for any k ∈ N. Finally, we show that the closure of the set of prime elements of D is the union of the group of units of D with a negligible part.