A vNIC in a VM can only attach to one VLAN. So , does it mean that if I have 50 VLANS , the networking appliances that do the routing will have 50 vNICs attached?
To be precise, a vNIC of a VM can only attach to one port group. This statement is only true if you run one VLAN per interface. (btw the maximum supported number of vNICs in a VM is 10)
The distributed vSwitch however can trunk multiple specific VLANs on a single port group (set Type to VLAN trunking) so that you could run a single VM vNIC with 50 VLANs at once. Like in the physical world when you trunk multiple VLANs on one server port, the VM's guest OS/software needs to be configured to take care of the 802.1q VLAN tag handling accordingly in this case.
In VMware terms VLAN tagging inside the guest this is usually referred to as "virtual guest tagging" (VGT), see:
VMware KB: Sample configuration of virtual machine VLAN Tagging (VGT Mode) in ESX
On a standard vSwitch you can use a port group with VLAN ID 4095 to trunk all available VLANs to this port group. See:
VMware KB: Configuring promiscuous mode on a virtual switch or portgroup
VLAN ID 4095 in VMware | virtualbrigade