@Pratyush Priyam Kuan

In your graph, we have a cycle of length = 4.

So in the cycle we need to omit an edge to get the Spanning tree. (Think of it as no. of ways of omitting 1 edge, in our example it is 4C1 = 4).

And the edges which are not in the cycle need to be selected mandatorily, as we don't have any other edge to reach the vertex which is not in the cycle.

So finally the number of spanning trees = 4C1 * 1C1 = 4 * 1 = 4.

Let me know if anything is wrong here. :)