The 3640 router has 4 slots and each slot can take up to 4 analog ports. So if you need 12 analog ports, you will use up 3 of the 4 available slots. The network module which houses the analog card is called NM-2V it has DSPs to process the voip calls and it has 2 VIC slots. Then you need to decide what TYPE of analog module you need. The options are: E&M, FXS, FXO.
You can populate the network module in anyway that you wish. There is some info on the NM-2V below: