i want to count commas after ',R,' (at the end of the row) and but my problem is - row start with word and that word can contain 'R' character. I want to count commas after ",R," in the row.
ar ,A01008,02189,0646,R,,,,,38
ab ,A01008,02189,0652,R,,,,,-17
aa ,A01008,02189,0657,R,,,,,,,,,,,,,-1838
aa ,A01008,02189,0671,R,,,,,-801
aa ,A01008,02189,0683,R,,,,,-10
aa ,A01008,02559,0620,R,,,,,,,,,,,,,,799
aa ,A01008,02559,0622,R,,,,,,,3551
aa ,A01008,02559,0626,R,,,,,,,-222