How to detect how many gamepads/players are available on a platform?

I am writing a PCL library that uses MonoGame. I need to know how many gamepads (or how many players) can be queried on the platform it’s running on. I would like to avoid having to add a platform specific implementation of my library just for this. Is there a way to query this information directly from MonoGame?

Thanks in advance!

Here’s how I solved it, but it’s far than being elegant:

            int count = 0;
            try {
                for (var i = 0 ; i < 4 ; i++) {
                    Microsoft.Xna.Framework.Input.GamePad.GetCapabilities((PlayerIndex)i);
                    count++;
                }
            } catch (Exception e) {
            } finally {
                MAX_SUPPORTED_GAMEPADS = count;
            }