A pleading shall state as a counterclaim any claim, not the subject of a pending action, which at the time of filing the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrences that is the subject matter of the opposing party's claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction.
§ 509.420, RSMo