The granting of a motion by the defendant for judgment of dismissal as to the plaintiff‘s cause of action shall not amount to the taking of a voluntary dismissal on any counterclaim which the defendant was required or permitted to plead pursuant to N.C. Gen. Stat. § 1A-1, Rule 13. (1959, c. 77; 1971, c. 1093, s. 3.)