I study Rock Paper scissor psychology using Excel. I save the games in a table named "Games" with the columns Player0 (which player used 0), Player1 and Winner (maybe 0, 1 or T for Tie).

I want to know how many winnings were made using each option (1) (table on the left), so I need to iterate over each row of the table to check whether the winnings were made using, for example, rock.
I tried using the following COUNTIF for rock
=COUNTIF( Games, IF( IF( $D = 0, $B, IF( $D = 1, $C, FALSE ) ) = "R", TRUE, FALSE ) )
but I can’t figure out what to use to access other columns on the same row (instead of $ D, $ B, $ C).
Expected Value:
Rock Win - 3
, Paper Win - 0
, Scissor Win - 7
, Tie - 12
(1) Example: Rock Win would be a Rock vs Scissor match.