public int getCount(String str){
  if(str==null) return 0;
  StringTokenizer s=new StringTokenizer(str,"/");
  return s.countTokens();
}