I may not be interpreting your question properly because there appears to be at least one word missing in your network description ...
I have to design a network where there are 4 <missing-word> within which are different number of VLANs with varying number of hosts per VLAN depending on the building.
If the missing-word is buildings, then I'll suggest the following answer assuming that the main router is behind a firewall, or at least provides none of the connectivity for the multiple VLANs that are mentioned.
The main router, the one with access to the Internet, will have at least two subnets per my interpretation of your problem definition. One subnet, either a /30 or /31, will be for the connection to the Internet Service Provider (ISP).
The second subnet, either a /30 or /31, will provide Layer 3 connectivity to a firewall or to another router that is providing access to the buildings and VLANs that you mention.
Note that the connection to the ISP typically has a Public IP address assigned to it either statically or via DHCP, unless the ISP is providing Network Address Translation (NAT) at their router.
If the ISP router is providing NAT, then you may need to supply the /30 or /31 subnet address for the connection between the main router and the ISP router, or the ISP can provide a Private IP address via DHCP for this connection.
If the ISP is NOT providing NAT, then the main router will receive a Public IP address from the ISP, and will have to provide NAT, since you're using Private IP address space, per RFC 1918, for your VLANs. The firewall, if you're using one, could also provide the NAT functionality.
There may be other solutions for this design, but the suggestions above should provide the information you need.