counting values in the coordinates