Clear["Global`*"]
SeedRandom[1234];
data = RandomReal[{-4000, 9000}, {1000, 2}];
xmin = Floor@Min@data[[All, 1]];
xmax = Ceiling@Max@data[[All, 1]];
xbinsz = (xmax - xmin)/10;
ymin = Floor@Min@data[[All, 2]];
ymax = Ceiling@Max@data[[All, 2]];
ybinsz = (ymax - ymin)/10;
bc = BinCounts[data, {xmin, xmax, xbinsz}, {ymin, ymax, ybinsz}]
(* {{7, 10, 7, 7, 6, 12, 11, 16, 8, 10}, {15, 6, 14, 6, 9, 5, 13, 11, 9, 9}, {5,
15, 12, 5, 9, 11, 16, 9, 7, 8}, {8, 8, 11, 10, 11, 7, 8, 8, 12, 9}, {8, 8,
11, 5, 11, 10, 10, 8, 11, 9}, {15, 5, 16, 8, 10, 3, 7, 13, 16, 10}, {17, 12,
6, 11, 13, 9, 11, 17, 15, 6}, {5, 5, 6, 11, 8, 11, 10, 9, 10, 10}, {9, 17,
11, 10, 13, 11, 6, 7, 10, 13}, {12, 9, 13, 13, 16, 12, 4, 14, 13, 11}} *)
All of the data is included
Length[data] == Total[Flatten@bc]
(* True *)
{nrow, ncol} = Dimensions@bc
(* {10, 10} *)
DiscretePlot3D[bc[[row, col]], {row, 1, nrow}, {col, 1, ncol},
ExtentSize -> 0.75]
