I have dove in teams of two, three and four. In regular open water, even number of divers split into teams of two buddies and the whole group tries to stay together, but the buddy teams ALWAY stay together.
Odd number of divers, 3 for example, one diver is designated as team leader and the other two divers form a buddy team who are responsible for following him. The leader checks back often with one or the other of the followers
Should the leader have a problem, two other divers are there to assist. If one of the followers has a problem, their buddy signals to the leader, then assists them. Should the leader miss the signal, one of his frequent backchecks should alert him to any problems instantly.
So far, this system has worked very well for us.