private static int countMp3Files(File directory) throws IOException
   {
      int numMp3s = 0;

      for(File file : directory.listFiles())
      {
         if (file.isDirectory())
         {
            numMp3s += countMp3Files(file);
         }
         else if (file.getName().endsWith(".mp3"))
         {
            MP3 mp3 = new MP3(file);
            numMp3s++;
         }
      }
      return numMp3s;
   }