You have to create a global variable like teams[2]; (or team1; and team2.
Then you have to check on OnPlayerDeath if the killerid is in one of the two teams and if yes teams[0] or teams[1] (depending on which is the team of the killerid) will be increased by one.
When teams[0] or teams[1] reach 50, you can reset it to 0 with teams[0] = 0; or teams[1] = 0.