private static int getPressedPointerCount(MotionEvent event) {
    int count = event.getPointerCount();
    int action = event.getActionMasked();
    if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP) {
      count--;
    }
    return count;
  }
Gets the number of pressed pointers (fingers down).
samples/gestures/src/main/java/com/facebook/samples/gestures/MultiPointerGestureDetector.java