Spanning tree is a graph that does not contain a cycle.
$\Rightarrow$ we can transform a cyclic graph into spanning tree by removing any one edge from it.
a Cyclic graph has edges =vertices= n(say).
$\Rightarrow$ we could remove any one edge from n edges to get a spanning tree
$\Rightarrow$ this could be done in n ways.
Hence the number of spanning tree in the cyclic graph is equal to the number vertices that cyclic graph.