row_counter and set count to 0.row in the grid, convert it into an equivalent hashable object and use it as a key to the row_counter. Increment the value of the corresponding key by 1.row_counter. If it does, increment count by the frequency.count.