A general answer is:
All the defendants should file counter-claim. All the defendants should pay the necessary court fee for counter-claim to the Court.
Not filing a counter-claim implies that he has given up his claim.
The judgment and decree of counter-claim would be applicable to first defendant only and not to the second defendant who did not file a counter-claim.
The judgment and decree would clearly specify the reliefs granted to the plaintiff, first defendant and second defendant. The reliefs granted to the first defendant would not automatically be applicable to the second defendant.
There are other options also, such as filing a suit, i.e. the second defendant can file another suit against the plaintiff of the first suit instead of filing a counter-claim. Either a counter-claim or another suit - both of them can achieve the same purpose.
If he has a claim, he must file either file a counter-claim or a separate suit against the plaintiff.
The above is a general answer. The exact answer would depend on the exact facts and circumstances of your case.