  In this article we consider a graphene sheet that is folded in various
compact geometries with arbitrary topology described by a certain genus, $g$.
While the Hamiltonian of these systems is defined on a lattice one can take the
continuous limit. The obtained Dirac-like Hamiltonian describes well the low
energy modes of the initial system. Starting from first principles we derive an
index theorem that corresponds to this Hamiltonian. This theorem relates the
zero energy modes of the graphene sheet with the topology of the compact
lattice. For $g=0$ and $g=1$ these results coincide with the analytical and
numerical studies performed for fullerene molecules and carbon nanotubes while
for higher values of $g$ they give predictions for more complicated molecules.
