I started PD with specify number of midi channels:
pd -alsamidi -midiindev 4 -midioutdev 4
And in PD-log I have:
sys_nmidiin 1, nmidiindev 4
Opened Alsa Client 128 in:1 out:1
And I have just 1 input and 1 output channels, can change it after start, but not before start.