I wish to overlap two layer and count the number of pixels which are overlapping and the leftovers one. Please help me with the same.
not clear what you want, but there is
http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/zonal-statistics.htm
http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/tabulate-area.htm
If you have an image illustrating what you want, it might be easier
I have two different raster having flooded pixels as value 1 and non flooded as 0. I wish to count the overlapped pixels.
There is the Combine, Plus and Cell statistics tools
http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/combine.htm
http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/cell-statistics.htm
Try the Cell Statistics geoprocessing tool.
https://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/cell-statistics.htm
And you can just add the 2 rasters together, then open the attribute table to see pixels counts of the values 0, 1, 2
If the cell sizes are the same, try this in Raster Calculator:
Con(("flood01" + "flood02") == 2, 1)
The output raster attribute table will have one row and its Count field will have the number of cells.
In case the cell sizes are different you could do this with area, using Raster Calculator:
ZonalGeometry(Con(("flood01" + "flood02") == 2, 1), "VALUE", "AREA")
All overlapping cells will have the value of the total area overlapped.
If you want to extract the overlap area and count the pixels, you can use any tool that depend on overlap raster ,such as
Cut Fill. The output of this tool will be the overlap area. we know you don't need cut and fill values, but if you open attribute table and count the pixel you will got the pixels count of overlap area.
Note you should to define the output pixel as original raster.
What result do you want to get is the two rasters have different resolution?
I think the best way is to build mosaic (or two mosaics) and overlap the polygons (footprint or boundary).
You can use intersect to get the overlap AREA. Divide that area with the pixel size if you want the number of pixels.
Have Fun
Thank you all for your suggestions, I need to get the data from the overlapped pixels only. So I converted the raster layer into polygon and removed the portions not concerned using editor and then converted again to raster. Then added the two and got 2 for overlapped pixels and 1 for the non- flooded pixels.