Count surfaces based on color

Hello Everyone,
I am trying to count the surfaces based on color in a specific way as shown below for each row and export to excel.I tried various ways to acheive this result ,but not succesful.
I have attached the dynamo file below with excel out put what i am looking for
Could some one help .


2_count.dyn (50.6 KB)