If the defendant counterclaims for improvements as before provided the plaintiff may, by motion, require the value of his estate in the land demanded, without the improvements, to be determined as provided for the assessment of rents, profits and improvements. Such value shall be the value which, at the time of assessment, the land would have had if the improvements had not been made by the defendant or a person under whom he claims.
Mass. Gen. Laws ch. 237, § 31