It needs to implement a mechanism that will count the number of repeated grids and send the value to the dedicated cell (name x).