How do I get microphone information?

How do I go about enumerating through all the microphones currently connected?

Or as an alternative, is there a way to just check if any microphones are plugged in into the machine at all?