We extend Matveev's complexity of 3-manifolds to PL compact manifolds of arbitrary dimension, and we study its properties. The complexity of a manifold is the minimum number of vertices in a simple spine. We study how this quantity changes under the most common topological operations (handle additions, finite coverings, drilling and surgery of spheres, products, connected sums) and its relations with some geometric invariants (Gromov norm, spherical volume, volume entropy, systolic constant). Complexity distinguishes some homotopically equivalent manifolds and is positive on all closed aspherical manifolds (in particular, on manifolds with non-positive sectional curvature). There are finitely many closed hyperbolic manifolds of any given complexity. On the other hand, there are many closed 4-manifolds of complexity zero (manifolds without 3-handles, doubles of 2-handlebodies, infinitely many exotic K3 surfaces, symplectic manifolds with arbitrary fundamental group).