How many Vlans encapsulation dot1q does support an c2821 with 2 Gigabit Ethernet interfaces?
in a router each Vlan subif takes a row in the IDB = interface descriptor block.
the total of physical and logical interfaces on your router cannot be higher then the IDB size.
This number is dependent on platform and IOS version.
on a c2821 the IDB can be 512
I didn't find the number so you should be able to implement several subinterfaces on your router.
I shouldn't go behind 20 subinterfaces per GE there are other factors to be considered like the size of the NIC MAC packet filter.
Hope to help