I was playing an EDH two-headed giant game with Nekusar, the Mindrazer as my commander. I enchanted him with Elder Mastery so they discard two cards whenever they take damage. Would they discard 4 cards each for Nekusar’s damage or discard 8 since they technically both take the damage since they share a life total?
Under C.R. 810.9, "[d]amage ... happen(s) to each player individually"; a team can't be dealt damage, as opposed to individual players. Even while declaring attackers in Two-Headed Giant, the appropriate player chooses which player or planeswalker a given creature is attacking (C.R. 810.7, 805.10b).
Thus, if Nekusar deals damage to only one player (or if Nekusar attacks a player and later deals combat damage to that player), Elder Mastery's ability will trigger for only that player, and only that player will have to discard two cards when the ability resolves.
EDIT: Correctness edit after comment 5 was posted.
EDIT (Sep. 6): Further correctness edit.
But both people on that team would draw a card, which would deal damage to that individual. So does that mean each of them would just discard two for each card discarded?
During the Draw Step, each player draws 2 cards (one for the normal draw and one from Nekusar). Since the Draw trigger from Nekusar and the damage trigger from Nekusar are actually trying to go onto the stack at the same time (and you have 2 of each trigger) you get to choose the order of the triggers so you can make them discard 2 before they draw their next card or vice versa. This is because if you have the damage trigger resolve before the Draw trigger, the Mastery Trigger will also end up resolving before the Draw trigger.
In the end though, each player is only dealt 2 damage from Nekusar. The fact that their shared life total decreases by 4 doesn't change the fact that each player is dealt 2 damage. So, each player discards 4 cards total each draw step.
But both people on that team would draw a card, which would deal damage to that individual. So does that mean each of them would just discard two for each card discarded?
In your scenario, Nekusar's ability will trigger whenever "an opponent" draws a card. Each ability that triggers this way will refer to only the player who draws a card and to no other players. Here's an illustration.
Your opposing team's draw step begins and you control Nekusar with Elder Mastery attached to it. Nekusar's first ability triggers twice, since it's two players' draw step. Each player in the team draws a card (as a turn-based action in the draw step, not as a result of Nekusar's first ability) (C.R. 805.4b), making Nekusar's second ability trigger twice, once for each player (C.R. 603.2). You put the abilities on the stack in any order, since you control Nekusar. In what follows, assume you put the abilities from Nekusar's second ability first.
All players pass then an ability from Nekusar's second ability resolves. Nekusar deals 1 damage to the player it refers to, which will be an opponent, making Elder Mastery's last ability trigger and go on the stack.
All players pass then that ability resolves. That player will discard two cards.
All players pass then the other ability from Nekusar's second ability resolves. Nekusar deals 1 damage to the player it refers to, which will be an opponent, making Elder Mastery's last ability trigger and go on the stack.
All players pass then that ability resolves. That player will discard two cards.
All players pass then an ability from Nekusar's first ability resolves. The player it refers to, which will be an opponent, draws an additional card. Assume they do so, so Nekusar's second ability will trigger and go on the stack.
All players pass then that ability resolves. Nekusar deals 1 damage to the player it refers to, which will be an opponent, making Elder Mastery's last ability trigger and go on the stack.
All players pass then that ability resolves. That player will discard two cards.
Thus, if Nekusar deals damage to only one player (or if Nekusar attacks a player and later deals combat damage to that player), Elder Mastery's ability will trigger for only that player, and only that player will have to discard two cards when the ability resolves.
EDIT: Correctness edit after comment 5 was posted.
EDIT (Sep. 6): Further correctness edit.
In the end though, each player is only dealt 2 damage from Nekusar. The fact that their shared life total decreases by 4 doesn't change the fact that each player is dealt 2 damage. So, each player discards 4 cards total each draw step.