Let f be a C 1 bivariate function with Lipschitz derivatives, and F = {x ∈ R 2 : f (x) λ} an upper level set of f , with λ ∈ R. We present a new identity giving the Euler characteristic of F in terms of its three-points indicator functions. A bound on the number of connected components of F in terms of the values of f and its gradient, valid in higher dimensions, is also derived. In dimension 2, if f is a random field, this bound allows to pass the former identity to expectations if f 's partial derivatives have Lipschitz constants with finite moments of sufficiently high order, without requiring bounded conditional densities. This approach provides an expression of the mean Euler characteristic in terms of the field's third order marginal. Sufficient conditions and explicit formulas are given for Gaussian fields, relaxing the usual C 2 Morse hypothesis.