public int size() {
        return compounds.size();
    }
Returns the number of compound elements in this. Which is exactly the number of dots in the string plus one.
The size of an empty compound is 0.
container-core/src/main/java/com/yahoo/processing/request/CompoundName.java