If $L_t=\sum_{i=1}^{N_t}Y_i$ is a compound Poisson process, then $\left|\left\{s\in[0,t]:\Delta L_s\in B\right\}\right|=\sum_{i=1}^{N_t}1_B(Y_i)$ Let $H$ be a $\mathbb R$-Hilbert space, $\mu$ be a finite measure on $\mathcal B(H)$ with $\mu(\{0\})=0$ and $(L_t)_{t\ge0}$ be a $H$-valued càdlàg Lévy process on a probability space $(\Omega,\mathcal A,\operatorname P)$ with $$L_t=\sum_{i=1}^{N_t}Y_i\;\;\;\text{for all }t\ge0\tag1$$ for some $H$-valued independent identically distributed process $(Y_n)_{n\in\mathbb N}$ on $(\Omega,\mathcal A,\operatorname P)$ with $Y_1\sim\lambda^{-1}\mu$ for some $\lambda>0$ and some càdlàg Poisson process $(N_t)_{t\ge0}$ on $(\Omega,\mathcal A,\operatorname P)$.

Let $t\ge0$ and $B\in\mathcal B(H\setminus\{0\})$. I would like to show that $$\left|\left\{s\in[0,t]:\Delta L_s\in B\right\}\right|=\sum_{i=1}^{N_t}1_B(Y_i),\tag2$$ where $$\Delta L_s:=L_s-L_{s-}=L_s-\lim_{r\to s-}L_r\;\;\;\text{for }s\ge0.$$ How can we do that?

Remark: Since the measure is not involved in $(2)$ it might be unimportant for the claim, but we may note that $$Z_n:=\sum_{i=1}^nY_i\;\;\;\text{for }n\in\mathbb N$$ is a time-homogenous Markov chain and hence $$L_t=Z_{N_t}\;\;\;\text{for all }t\ge0$$ is a time-homogeneous Markov process.
 A: $\newcommand{\De}{\Delta}$
This is not really a probability problem, since the equality
\begin{equation}\label{1}\tag{1}
    l_t:=|\{s\in[0,t]\colon\De L_s\in B\}|=\sum_{i=1}^{N_t}1_B(Y_i)=:r_t
\end{equation}
holds almost everywhere on $\Omega$, for "almost" any joint distribution of the involved random variables -- provided only that $0\notin B$ and for all real $t\ge0$
\begin{equation*}
    N_t=\sum_{i=1}^\infty 1(\tau_i\le t), \tag{1.5}
\end{equation*}
where $0=\tau_0<\tau_1<\cdots$, so that for all natural $i$ and all real $t\ge0$
\begin{equation}\label{2}\tag{2}
    i\le N_t\iff\tau_i\le t. 
\end{equation}
(Of course, here $\tau_1<\tau_2<\cdots$ are the times of the jumps of the Poisson process $N_\cdot$.)
Indeed, then for any $j\in\{0,1,\dots\}$ and any real $t\ge0$
\begin{equation*}
    L_t=\sum_{i=1}^{N_t}Y_i=\sum_{i=1}^j Y_i\quad\text{if}\quad \tau_j\le t<\tau_{j+1}. 
\end{equation*}
Hence, for each real $s\ge0$, we have $\De L_s=Y_j$ if $s=\tau_j$ for some $j\in\{1,2,\dots\}$, and $\De L_s=0$ if $s\ne\tau_j$ for any $j\in\{1,2,\dots\}$.
It follows that
\begin{equation*}
    l_t=\sum_{j=1}^\infty 1(Y_j\in B,\tau_j\le t).
\end{equation*}
On the other hand, for all real $t\ge0$
\begin{equation*}
    r_t=\sum_{i=1}^{N_t}1_B(Y_i)
    =\sum_{i=1}^\infty 1(Y_i\in B,i\le N_t)=\sum_{i=1}^\infty 1(Y_i\in B,\tau_i\le t),
\end{equation*}
by (\ref{2}).
Thus, $l_t=r_t$ for all real $t\ge0$, so that (\ref{1}) does hold.
