SerialDevice.Count
From Xojo Documentation
Read-Only Property (As Integer )
Returns the number of serial devices available.
Example
The following displays the names of the serial devices on the computer:
Returns the number of serial devices available.
The following displays the names of the serial devices on the computer: