If permanent improvements have been made by a defendant, or persons under whom the defendant claims in good faith, the value of the improvements, except improvements made upon mining property, shall be allowed as a setoff or counterclaim against the damages recovered for withholding the property.
Utah Code § 78B-6-1307