How many Midi devices is possible to use in session simultaneously?

How many Midi devices is possible to use in session simultaneously?