Interpolation theorem for the number of degree-preserving vertices of spanning trees