Number of port signals in the prefix of signals.
New hierarchy producers provide this directly. The fallback maintains compatibility for manually-created legacy occurrences.
int get portCount => _explicitPortCount ?? ports.length;