public int size() {
        return map.size();
    }
Returns the number of key-weight pairs in this set.

@return the number of key-weight pairs in this set
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java