getSize

public long getSize()

Returns the number of nodes in this iterator.

Note: The number returned by this method may differ from the number
of nodes actually returned by calls to hasNext() / getNextNode()! This
is because this iterator works on a lazy instantiation basis and while
iterating over the nodes some of them might have been deleted in the
meantime. Those will not be returned by getNextNode(). As soon as an
invalid node is detected, the size of this iterator is adjusted.