The defendant may continue a counterclaim if the —
(a) court gives judgment on the claim for the claimant and does not dismiss the counterclaim; or
(b) claim is stayed, discontinued or dismissed.