if ( onlyChild.isLeaf()
&& ! ( onlyChild instanceof ScopeNode )
&& ! ( onlyChild instanceof AssertionNode )
&& ! ( onlyChild instanceof PresenceNode ) )
{
LeafNode leaf = ( LeafNode ) onlyChild;
Index idx = db.getUserIndex( leaf.getAttribute() );
return BigInteger.valueOf( idx.count() );
}
return BigInteger.valueOf( db.count() );
}