public int getNumPorts() {
        return ports.size();
    }
Get the number of ports with registered meta.

@return the number of ports that have been registered
config-model/src/main/java/com/yahoo/vespa/model/PortsMeta.java