return map.getTotalLayers();
int totalLayers=0; for(int j=0;j<map.getTotalLayers();j++) { if(map.getLayer(j).getClass() == SelectionLayer.class) { if(TiledConfiguration.keyHasValue("tiled.layer.showselection","1")) { totalLayers++; } } else { totalLayers++; } } return totalLayers;
    public int getRowCount() {        if (map != null) {            return map.getTotalLayers();        } else {            return 0;        }    }