static protected int countMatches(final Graph g,final Resource s,final URI p,final Value o){
  int n=0;
  final Iterator<Statement> itr=g.match(s,p,o);
  while (itr.hasNext()) {
    itr.next();
    n++;
  }
  return n;
}

static protected int countMatches ( final Graph g , final Resource s , final URI p , final Value o ) { int n = 0 ; final Iterator < Statement > itr = g . match ( s , p , o ) ; while ( itr . hasNext ( ) ) { itr . next ( ) ; n ++ ; } return n ; }
count matches of the triple pattern .
