code: private static int getTilesNumber(int tileWidth, int tileHeight, Collection<Media> levelRips)
      {
          int tiles = 0;
          for (final Media levelRip : levelRips)
          {
              final ImageHeader info = ImageInfo.get(levelRip);
              final int horizontalTiles = info.getWidth() / tileWidth;
              final int verticalTiles = info.getHeight() / tileHeight;
              tiles += horizontalTiles * verticalTiles;
          }
          return tiles;
      }
docs: Get the total number of tiles.
  
  @param tileWidth The tile width.
  @param tileHeight The tile height.
  @param levelRips The levels rip used.
  @return The total number of tiles.