How do I use /testfor to help for a Capture The Flag game?

Try this:

/tag @a add sel
/tag @a add sel
/tag @a add sel
/tag @a add sel
/say 4 players
/tag @a remove sel

Add commands before the last command (the remove command should be last in the chain). Everything should be a chain conditional, except for the first one which should be an impulse unconditional (assuming that’s the start). The very last command block should also be unconditional.