Where a claim or demand can be transferred, the transfer thereof passes an interest, which the transferee may enforce by an action or special proceeding, or interpose as a defense or counter-claim, in his own name, as the transferrer might have done; subject to any defense or counter-claim, existing against the transferrer, before notice of the transfer, or against the transferee. But this section does not apply, where the rights or liabilities of a party to a claim or demand, which is transferred