Itensity of a compensator Let $\left(\Omega,\mathcal{F},P\right)$ a probability space. Suppose we have a step process $J$. Let $N$ be the jump measure of $J$.
We assume that the integer-valued random measure $N$ has the $\mathcal{F}$-predictable compensator
$$\nu(dz, dt) = Q(t, dz)\eta(t)dt$$
where
where $\eta: \Omega \times [0, T ] \times\mathbb{R}\rightarrow [0, \infty)$ is an $\mathcal{F}$-predictable process, $Q(t, ·)$ is a
probability measure on $\mathcal{B}(\mathbb{R})$ for $(\omega, t) \in \Omega × [0, T ]$, $Q(., A) : \Omega \times [0, T ] \rightarrow
[0, 1]$ is an $\mathcal{F}$-predictable process for $A \in \mathcal{B}(\mathbb{R})$, and
$$N([0, t], \{0\}) = Q(t, \{0\}) = 0$$
for $0\leq t\leq T$.
Let $\lambda:\Omega\times\rightarrow (0,\infty)$ be a predictable process. We further assume that $J$ has the special form $J=\sum_{i=1}^n1_{\{T_i\leq t\}}$
for $0\leq t\leq T$ for stopping times which are conditional on $\mathcal{F}^\lambda_t$ independent and 
$$P(T_i > t\mid \mathcal{F}^\lambda)=exp(-\int_0^t\lambda_sds)$$
Why do we have now $\eta(t) = (n − J (t-))\lambda(t)$? I see that $n-J(t-)=\sum_{i=1}^n 1_{T_i\geq t}$
 A: If we have a counting process $N=\left(N_t\right)_{t\geq 0}$ of the form $N_t=\sum_{i=1}^n1_{\{T_i\leq t\}}$, then $N$ is a submartingale and therefore has a predictable and increasing compensator $\Lambda=(\Lambda_t)_{t\geq 0}$, that is $M=(M_t)_{t\geq 0}$ defined by 
$$M_t=N_t-\Lambda_t$$ is a martingale. Now, if we know that $\tilde{M}=\left(\tilde{M}_t\right)_{t\geq 0}$ defined by $$1_{\{T_i\leq t\}}-\int_0^t 1_{\{T_i>t\}}\lambda_s ds$$ is a martingale, then we have 
$$\sum_{i=1}^{l_a}1_{\{T_i\leq t\}}-\int_0^t1_{\{T_i>t\}}\lambda_sds=N_t-\int_0^t\sum_{i=1}^{n}1_{\{T_i>s\}}\lambda_sds=N_t-\int_0^t(n-N_{s-})\lambda_sds$$ 
That means $M$ is a martingale and we have found the compensator of $N$, which is $t\mapsto\int_0^t(n-N_{s-})\lambda_sds$ and by definition the intensity of the counting process is $\tilde{\lambda}=(\tilde{\lambda_t})_{t\geq 0}$ defined by $$\tilde{\lambda_t}=(n-N_{t-})\lambda_t$$ (see here for a definition of intensity of a counting process). That $\tilde{M}$ is indeed a martingale, is proposition 9.15 in the book "Quantitative Risk Management" by Frey and Embrechts. 
