_NUMPORTS — Returns the number of printer ports available.
_NUMPORTS
See also @NUMPORTS, which allows you to filter the count by name or port type.
@NUMPORTS