The most general
form of Euler's formula for polyhedra
includes the genus
V - E + F = 2 - 2g,
where 2 - 2g = χ is the Euler characteristic.
In the case of the plane, g = 0, so we get the original V - E + F = 2. For a torus or the Klein bottle, g = 1, so V - E + F = 0.