public int getPortCount() {
        int httpPorts = (getHttp() != null) ? 0 : 2;
        return httpPorts + numMessageBusPorts() + numRpcPorts();
    }
@return the number of ports needed by the Container
config-model/src/main/java/com/yahoo/vespa/model/container/Container.java