Consider a set of data having the form $\{\{x_{1}, y_{1}\}, …,\{x_{n},y_{n}\}\}$. Each point from the set corresponds to 1 event with coordinate $x, y$. I'm looking for a procedure in Mathematica that allows me to automatically create bins within given intervals in $x$ and $y$ and then to compute double differential events distribution $d^{2}N/dxdy$. Or, equivalently, a procedure that returns a table with three columns in the form $$ \{\{\bar{x}_{1}, \bar{y}_{1},N_{\text{events}|_{\bar{x}_{1},\bar{y}_{1}}}\},\{\bar{x}_{2}, \bar{y}_{2},N_{\text{events}}|_{\bar{x}_{2},\bar{y}_{2}}\},...\} $$ Here $\bar{x}_{i}, \bar{y}_{i}$ denotes $i$th bin.
I expect that somehow this can be done by using Histogram function, but I am not sure about this. Could you please tell me how to do this?