public boolean parse(final String conf) {
        if (StringUtils.isBlank(conf)) {
            return false;
        }
        reset();
        final String[] peerStrs = StringUtils.split(conf, ',');
        for (String peerStr : peerStrs) {
            final PeerId peer = new PeerId();
            int index;
            boolean isLearner = false;
            if ((index = peerStr.indexOf(LEARNER_POSTFIX)) > 0) {
                // It's a learner
                peerStr = peerStr.substring(0, index);
                isLearner = true;
            }
            if (peer.parse(StringUtils.trim(peerStr))) {
                if (isLearner) {
                    addLearner(peer);
                } else {
                    addPeer(peer);
                }
            } else {
                LOG.error("Fail to parse peer {} in {}, ignore it.", peerStr, conf);
            }
        }
        return true;
    }
Returns the peers total number.

@return total num of peers
jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java