Counting the unique values in a raster