for(Match nextMatch = np.match; nextMatch != null; count++) {
for(Match nextMatch = np.match; nextMatch != null; ) { count += nextMatch.getFrequency();
    public Sequence eval(Sequence[] args, Sequence contextSequence)            throws XPathException {        // return 0.0 if the argument sequence is empty		if(args[0].getLength() == 0)			return IntegerValue.ZERO;		int count = 0;		for(SequenceIterator i = args[0].iterate(); i.hasNext(); ) {		    Item next = i.nextItem();		    if(Type.subTypeOf(next.getType(), Type.NODE)) {		        NodeValue nv = (NodeValue)next;		        if(nv.getImplementationType() != NodeValue.PERSISTENT_NODE)		            throw new XPathException(getName() + " cannot be applied to XQuery-constructed nodes.");		        NodeProxy np = (NodeProxy)nv;		        for(Match nextMatch = np.match; nextMatch != null; count++) {		            nextMatch = nextMatch.getNextMatch();		        }		    }		}		return new IntegerValue(count);    }