Where a defendant sets up in his answer a counterclaim, upon which he demands an affirmative judgment affecting the title to, or the possession, use or enjoyment of real property, he may file for record a like notice at the time of filing his answer or at any time afterwards before final judgment. For these purposes, the defendant filing such a notice is regarded as a plaintiff and the plaintiff is regarded as a defendant.
MCL 600.2711