Can TCAS cope with situations involving more than two aircraft?
TCAS can deal with conflicts with multiple aircraft, a so called Multiple Threat Encounter. It will attempt to resolve the conflict but it will be limited in its options.

Examples of a MTE are rare, one case I can point to is this incident involving an aircraft turning into the approach stream between two aircraft instead of following the last in line. 

MIT Lincoln lab has reported on MTEs and the TCAS algorithm performance in 2009. They report the majority of MTEs involved three aircraft, but mention one TCAS MTE involving seven aircraft.