point2count function

Convert a plot sample of points into one of counts.