For an n-dimensional random field X(t) we define the excursion set A of X(t) by A = [t ∊ S: X(t) ≧ u] for real u and compact S ⊂ Rn. We obtain a generalisation of the number of upcrossings of a one-dimensional stochastic process to random fields via a characteristic of the set A related to the Euler characteristic of differential topology. When X(t) is a homogeneous Gaussian field satisfying certain regularity conditions we obtain an explicit formula for the mean value of this characteristic.