code: int CountRange(int NumofGlyphs,int Type){
      	int num=0;
      	@SuppressWarnings("unused")
  		char Sid;
      	int i=1,nLeft;
      	while (i<NumofGlyphs){
      		num++;
      		Sid = getCard16();
      		if (Type==1)
      			nLeft = getCard8();
      		else
      			nLeft = getCard16();
      		i += nLeft+1;
      	}
      	return num;
      }
docs: Function calculates the number of ranges in the Charset
  @param NumofGlyphs The number of glyphs in the font
  @param Type The format of the Charset
  @return The number of ranges in the Charset data structure