Is there a way to show all the kills of a team in one scoreboard?

First, make a score to store kills, /scoreboard objectives add kills playerKillCount Then make a fake player to store the team kills, so for team red for example: /scoreboard players set Red teamKills 0.

Lastly, you will have a small command chain for each team. It will make each player on the team add their kills score to the team total, then reset their kills score:

/scoreboard players operation Red kills += @a[team=red,score_kills_min=1] kills
/scoreboard players reset @a[team=red,score_kills_min=1] kills

And of course you will want to display it in the sidebar: /scoreboard objectives setdisplay sidebar kills


El Six's answer above mostly works on Minecraft Java Edition 1.16.5, but needs a few adjustments for consistency:

Step 1: Make a custom objective called "kills", which will be tied to Minecraft's built-in "playerKillCount" attribute which tracks player kills automatically. Note that you can use "totalKillCount" here instead if you also want to track ALL mobs + players that were killed instead:

/scoreboard objectives add kills playerKillCount

Step 2: Create a dummy player "RedTeam" to track kills for the "red" team, initialize it to 0 so it will show on the board later:

/scoreboard players set RedTeam kills 0

Step 3: The first command will add the player kills from "red" team members to the custom "RedTeam" marker, which we will see on the sidebar. The second command resets the players' individual kill scores, which keeps them from showing on the board and also makes sure we don't add team kills more than once. Loop these commands through a command block or data pack or script for each team:

/scoreboard players operation RedTeam kills += @a[team=red] kills

/scoreboard players reset @a[team=red] kills

Step 6: Track the kills for "RedTeam" on the visible sidebar scoreboard:

/scoreboard objectives setdisplay sidebar kills

You will know that this worked if you see the "RedTeam" getting tracked as in the picture below.

If you need to test team scores solo (without any other players), consider replacing "playerKillCount" with "totalKillCount" -- this will allow you to kill mobs and see your team score increase.

enter image description here