I've read on this site that it takes several microphones to record a drum kit. How many mics does it take to record an electronic drum kit? Is it the same approach? What if it is plugged into an amplifier?
Electronic drums really don't need any mics. Because they are electronic, you can record straight from the audio output (headphone jack if there are no other outputs). If you have it connected to an amplifier, you can record it the same way you would record an amplifier, by either micing up the speaker or by taking any line level output to record. If you want to capture noise from the pads and sticks, mic it up like you would an acoustic drum kit. I understand the question about amplifiers, because electric guitar for example is often recorded through an amplifier, even though it has an output jack built in. But unless you are looking to alter the sound of your kit with the amplifier, just record it direct.
No microphones are are needed at all - that's the whole point of an electronic kit! You get an electrical output, not noise.
But as that's so obvious, I guess you mean how many input channels?
As a rule of thumb, two. The control unit of an electronic kit will be capable of pre-mixing and panning the various 'drums' into a stereo output. I expect it has a Mono Out option as well, so you could get away with one. It MAY have individual outputs for each 'drum', allowing you to record them to individual channels and have full control of mixing - that would need as many audio input channels as there are individual outputs.
But the short answer is - two. A stereo pair.
One uses multiple mics on a drum kit in order to be able to change and adjust the sound and balance later during mixing. Close micing of individual drums can also aid in drum replacement. Effects can be applied individually to the output of each mic, changing the feel of the drum kit. Even if one intends to set up the exact mix at the start and it is not changed, there may not be exactly one mic position which captures the kit exactly as desired. Multi-micing can work around this. Unless one has an amazing drum room to record in, getting great sound usually involves some amount of manipulation in mixing and having some degree of separable control over the different parts of the kit helps a great deal in creating the sound of an incredible room.
With electronic drums, one can record MIDI, record the synthesized output of each pad, or record a predetermined mix of the entire kit. In a strict sense, zero mics are used. One either needs a MIDI input, or some number of line inputs to capture the audio signals.
The closest equivalent to using multiple mics on a real drum kit would be to record each electronic pad's synthesized output separately and then create a cohesive sound in the mix. In some sense this represents the Platonic ideal of drum micing in that there is no bleed from one drum into any other drum's mics. Note however in real world recording that which sounds good beats Platonic ideals every single time. (One will also likely have to have a decent stereo mix during recording for monitoring purposes.)
The main limitations in doing the above are that only highend drum synths have a way to get the individual tracks and one may not have enough audio inputs to cover all the pads on a large setup. Sometimes when doing this sort of thing, one will take MIDI off the electronic drums to drive multiple drum synths to get separate tracks. Many drum synths allow applying effects to each pad separately and such so one can prearrange the mix to sound the way one wants, but it involves the UI on the drum synth, which may not be particularly easy to use. Most drum synths do output stereo so two line-ins would likely be the minimum for decent quality recording.
If doing any sort of drum replacement, the MIDI approach can be quite useful. It requires a somewhat different approach to tracking and requires doing synthesis, usually as a separate mixdown pass. Most digital audio workstation products have integrated MIDI in with traditional mixing. There are vast addon drum sound libraries available.
One could also run a monitoring mix out to speakers and use room mics to record something, but this is typically not going to work well with electronic drums as the sound of the sticks hitting the pads is not usually desirable and any bleed into the mics will have that sound. That technique would require actual mics.
So the answer is probably zero mics and either zero line-ins but one MIDI in, or anywhere from two line-ins to as many line-ins as one has pads.