Section 18. The defendant may interpose a counterclaim for the value of such improvements.