If a defendant claims to be entitled to any equitable estate or right, or to
relief upon any equitable ground against any deed, instrument, or contract, or
against any right, title, or claim asserted by any plaintiff in the cause or
matter, or alleges any ground of equitable defence to any such claim of the
plaintiff, the court shall give to every equitable estate, right, or ground of
relief so claimed, and to every equitable defence so alleged the same effect
by way of defence against the claim of the plaintiff as the court in its
equitable jurisdiction ought formerly to have given if the same or the like
matters had been relied on by way of defence in a suit or proceeding
instituted in that court for the like purpose.