Determine the number of faces in the graph. These are the spaces defined by a set of edges. Using a map analogy, if the edges are boundaries between countries, then the faces are the countries. This may be provided to you in the problem, or you may have to determine it from relationships. Note that this includes the infinite, unbounded face, which is the expanse external to all the edges.
Determine the number of vertices. In a planar graph, edges are not allowed to intersect, but they are allowed to meet a points called vertices.
Add the number of faces and vertices. Then subtract two from this quantity. Supposing that your graph meets all the requisite criteria, most importantly that it is planar, then this is the number of edges.
Euler's formula : vertices ' edges + faces = 2