code: public static int getNumFrames(byte[] fingerprint) {
  
          if (fingerprint.length < 8) {
              return 0;
          }
  
          // get the last x-coordinate (length-8&length-7)bytes from fingerprint
          return ((fingerprint[fingerprint.length - 8] & 0xff) << 8 | (fingerprint[fingerprint.length - 7] & 0xff)) + 1;
      }
docs: Number of frames in a fingerprint
  Each frame lengths 8 bytes
  Usually there is more than one point in each frame, so it cannot simply divide the bytes length by 8
  Last 8 byte of thisFingerprint is the last frame of this wave
  First 2 byte of the last 8 byte is the x position of this wave, i.e. (number_of_frames-1) of this wave
  
  @param fingerprint	fingerprint bytes
  @return number of frames of the fingerprint