code: public SAXPointsNumber[] countPointNumberAfterRemoving(double[] ts,
        ArrayList<SameLengthMotifs> allClassifiedMotifs) {
  
      // init the data structure and copy the original values
      SAXPointsNumber pointsNumber[] = new SAXPointsNumber[ts.length];
      for (int i = 0; i < ts.length; i++) {
        pointsNumber[i] = new SAXPointsNumber();
        pointsNumber[i].setPointIndex(i);
        pointsNumber[i].setPointValue(ts[i]);
      }
  
      for (SameLengthMotifs sameLenMotifs : allClassifiedMotifs) {
        for (SAXMotif motif : sameLenMotifs.getSameLenMotifs()) {
          RuleInterval pos = motif.getPos();
          for (int i = pos.getStart(); i <= pos.getEnd() - 1; i++) {
            pointsNumber[i].setPointOccurenceNumber(pointsNumber[i].getPointOccurenceNumber() + 1);
          }
        }
      }
      return pointsNumber;
    }
docs: This method counts how many times each data point is used in REDUCED sequitur rule (i.e. data
  point 1 appears only in R1 and R2, the number for data point 1 is two). The function will get
  the occurrence time for all points, and write the result into a text file named as
  "PointsNumberAfterRemoving.txt".
  
  @param ts the input time series.
  @param allClassifiedMotifs the motifs classified into a same set.
  @return points count.