code: private int countEvents(TouchState newState) {
          int count = state.getPointCount();
          for (int i = 0; i < newState.getPointCount(); i++) {
              TouchState.Point newPoint = newState.getPoint(i);
              TouchState.Point oldPoint = state.getPointForID(newPoint.id);
              if (oldPoint == null) {
                  count ++;
              }
          }
          return count;
      }
docs: Calculate the number of touch point events that will be sent by
  dispatchPoints(). This is the union of the touch points in the old and
  new states.