Hello,
there are two options in 'lasgrid' to create counter rasters.
Either you can - as suggested - use the '-counter' switch which by default is only a one byte counter that can count from 0 to 255. If you expect more points in your area use '-counter_16bit' that can count from 0 to 65535'. That is usually enough unless you have a large step size and very dense LiDAR in which case you should use '-counter_32bit'. This just produces a counter for the number of returns falling into each 5 by 5 area (e.g. 25 square meters) assuming you used '-step 5'. For the visualization as a false color you need to do the math yourself. If blue is to be mapped to 5 point per square meters or less and red is supposed to be 10 points per square or more you need to multiply the values by 25 when you '-set_min_max 5*25 10*25' the color ramp for the '-false' coloring from blue to red.
lasgrid -in lidar.laz ^
-last_only ^
-step 5 -counter_16bit ^
-false -set_min_max 125 250 ^
-o density_5_10.png
However, to directly get area-normalized counts it may be more convenient to use the '-point_density' switch. Or the corresponding '-point_density_16bit' or '-point_density_32bit' options. Here the number is already normalized by the area so you can simply '-set_min_max 5 10' as the color ramp for the '-false' coloring from blue to red.
lasgrid -in lidar.laz ^
-last_only ^
-step 5 -point_density_16bit ^
-false -set_min_max 5 10 ^
-o density_5_10.png
Make sure to use the '-keep_last' or '-last_only' filter if you want to count the pulse per square meters so you only use one return from every pulse.
Regards,
Martin @rapidlasso