upto approximatePatternCount