We deal with a subject in the interplay between nonparametric statistics and geometricmeasure theory. The measure L0(G) of theboundary of a set G ⊂ ℝd (withd ≥ 2) can be formally defined, via a simple limit, bythe so-called Minkowski content. We study the estimation ofL0(G) from a sample of random points insideand outside G. The sample design assumes that, for each sample point, weknow (without error) whether or not that point belongs to G. Under thisdesign we suggest a simple nonparametric estimator and investigate its consistencyproperties. The main emphasis in this paper is on generality. So we are especiallyconcerned with proving the consistency of our estimator under minimal assumptions on theset G. In particular, we establish a mild shape condition onG under which the proposed estimator is consistent inL2. Roughly speaking, such condition establishes that theset of “very spiky” points at the boundary of G must be “small”. This isformalized in terms of the Minkowski content of such set. Several examples arediscussed.