  We consider virtual pullbacks in $K$-theory, and show that they are bivariant
classes and satisfy certain functoriality. As applications to $K$-theoretic
counting invariants, we include proofs of a virtual localization formula for
schemes and a degeneration formula in Donaldson-Thomas theory.
