CountPorts

Get the number of serial ports, currently present in a system. Serial port names can be obtained by GetPortName property.  

LONG CountPorts;

Property Value
    The total number of serial ports in a system.