First of all, you don't necessarily need to record the MIDI to a file on an SD card in the keyboard and then transfer it to the computer; most modern keyboards have either MIDI In/Out ports or a USB port which can transmit MIDI directly to the computer for recording in a DAW. If the keyboard has only MIDI In/Out ports then you'll normally have to get a MIDI-to-USB adapter/cable for connecting the keyboard's MIDI ports to one of the computer's USB ports. However, if you have an audio interface then it might include MIDI In/Out ports, in which case you (probably) wouldn't need to get a separate MIDI-to-USB adapter/cable-- although I've heard of some cases in which someone with a keyboard from a particular manufacturer ended up having to get a MIDI-to-USB adapter/cable from that same manufacturer, so as to be able to use that manufacturer's USB-MIDI driver.
An audio interface is generally needed only if you want to record the audio from a keyboard or other instrument-- including acoustic instruments or the human voice using microphones. What the audio interface does is take the analog audio signals from things like electric guitars, electronic keyboards, and microphones, and convert those analog signals into digital signals so they can be sent to the computer via a USB connection. Also, an audio interface will generally have a higher-quality sound card than the one inside your computer, so you can direct your computer programs to output their audio to your audio interface, then connect the audio interface to speakers, to get better-quality sound than what your computer's sound card could provide. And if you have instruments which have MIDI ports but no USB ports then you can get an audio interface which has one or more sets of MIDI ports. The price of audio interfaces can vary a good bit depending on how many and what types of jacks and ports they have for connecting microphones, electric/electronic instruments, MIDI devices, etc.
Note that you might be able to get by without an audio interface by connecting your instrument's audio output directly to your computer's audio input (mic jack) and using your computer sound card's analog-to-digital converter. However, the quality generally won't be as good as what an audio interface can provide. Still, you could try that out and see how well it works for you until you decide that you can't get by without an audio interface. That's the method I was using for a long time-- going directly to the computer-- and it worked okay for me except for a bit of line noise (hiss or hum) that I needed to remove with my DAW.
Of course, an audio interface isn't necessary at all if you're just connecting a keyboard to your computer via USB so you can send and receive MIDI.
If you're working entirely in MIDI (using virtual instruments on your computer), then the number and quality of the sounds that your keyboard produces don't matter at all-- in fact, you could get a keyboard that doesn't produce any sounds of its own, called a "MIDI keyboard controller." Of greater importance than the number and quality of the keyboard's sounds would be the nature of its keybed. Keyboards can have piano-style keys or organ-/synth-style keys, and some people prefer one style or the other. You also want a keyboard that is velocity-sensitive (also called "touch-sensitive"), meaning the keyboard can detect how fast (forcefully) you're striking the keys and translate that into different sound levels (quiet, medium, loud). And a keyboard with piano-style keys may or may not have weighted or semi-weighted keys.
Thus, if you're planning to use virtual instruments on a computer then you might be better off getting a MIDI keyboard controller rather than an instrument that can produce sounds of its own, so you can put the money toward getting a controller that has the types of keys and keybed that you prefer, along with a nice selection of controls (dials, sliders, buttons, etc.) that can be assigned to various functions in the DAW and/or virtual instruments that you're using. In contrast, the controls on a keyboard instrument often do not generate MIDI messages, since they're intended to control functions inside the keyboard as opposed to functions outside it.
(EDIT: Gary, you snuck your post in while I was writing mine. My philosophy is "Never use two words when ten paragraphs will do." Just kidding! I think?)