to count ocurrences