assume your row of text is in cells a1:z1

create a column of the unique text somewhere - say a3:a10
you could do this by copyimg the row of text to a column somewhere (paste special, transpose) and then filter, advanced, unique records

in b3(adjacent to first entry in column of unique text)

=sumproduct((b3=a$1:z$1)*1) and copy this down next to your unique

in cell c3 = rank(b3,b$3:b$10) (adjust row 10 for length of your column of text