Let’s say your row is in cells A1:Z1. To count how many times each unique value appears, use this formula:
=MAX(COUNTIF(A1:Z1, A1:Z1))