47. If any Defendant has a set-off or counterclaim against the Plaintiff, lie shall state the same to the Court or Judge at the time of his appearance, and if it shall appear to the Court or Judge that the set-off or counterclaim can be conveniently disposed of in the action, the same proceedings shall be had and taken as are provided in Rule 39 for ascertaining what are the facts in dispute, and such set-off or counter-claim shall be disposed of by the judgment in the action. But if in the opinion of the Court or Judge such set-off or counterclaim cannot be conveniently disposed of in the action, the Court or Judge may decline so to dispose of it.