G denotes the total number of games played in (in any capacity) by a player. It doesn not matter how much of the game the player played. If player A plays the whole game until there are two out in the bottom of the ninth inning, and then is replaced by player B as a pinch-runner for the final third of an inning, then both A and B are credited with one game played.