If you know the index of the column till where the row extends,then
loop through the count
Use Get Cell Color to get the color of each cell in that row
Use a dictionary and add logic to chk if the colour exists in the entity if not then add to the dictionary as key and similarly assign 1 if not present else increment the counter in the value part of the dictionary
-The dictionary will contain the color and count