How can I create a 3D histogram with R?

For example, I have two variables to be counted for the number of times they fall in a defined two dimensional bin. So I have two variables in the X and Y axis, while the Z axis is the count of the two variables.

Edit
Report