I know that routers are used to divide the networks but i am confused to check the number of networks in the following diagram. Does the switches that are in the green color is a seperate subnetwork? or they belong to the same subnetwork of network marked in red color? please help thanks
Considering that we do not deal with VLAN that adds a layer in the graph, but with a basic configuration (no sub interface, ...) the red area is related to a single subnetwork/network. In fact the right term is broadcast domain (and not sub/network). That is the switch (I mean L2 only switch) is not aware of IP addresses and the switch is achieved by only looking at the ethernet header (ie. a map between the destination MAC addresse and the outgoing interface).
Therefore, considering the figure you provided and the captions (core, distribution, access) that seems to define a network hierarchy, the left interface of the "core" router may has a configured IP address (eg. 192.168.1.1/24) and all computers/servers directly connected to the switches in the red area (connected to the left interface of router) will belong to the same subnet (192.168.1.0/24).