public int numAnnotations() {
        return annotations.annotations().size();
    }
Returns the total number of annotations in the tree.

@return the total number of annotations in the tree.
document/src/main/java/com/yahoo/document/annotation/SpanTree.java