  We define an invariant, which we call surface-complexity, of compact
3-manifolds by means of Dehn surfaces. The surface-complexity is a natural
number measuring how much the manifold is complicated. We prove that it fulfils
interesting properties: it is subadditive under connected sum and finite-to-one
on $\mathbb{P}^2$-irreducible and boundary-irreducible manifolds without
essential annuli and M\"obius strips. Moreover, for these manifolds, it equals
the minimal number of cubes in a cubulation of the manifold, except for the
sphere, the ball, the projective space and the lens space $\mathbb{L}_{4,1}$,
which have surface-complexity zero. We will also give estimations of the
surface-complexity by means of ideal triangulations and Matveev complexity.
