This is routine (and I am quite sure covered by standard textbooks), although somewhat tedious. First, for a compactly supported, non-negative and continuous $f$, one writes
$$ S_t[f] := \sum_{s \leqslant t} f(s, X_{s-}, X_s) = \lim_{n \to \infty} \sum_{i = 0}^{\lfloor n t\rfloor} f(\tfrac in, X_{(i-1)/n}, X_{i/n}) , $$
which shows that the left-hand side is measurable. Next, for an open and bounded $B$, one approximates the sum of $\mathbb 1_B(s, \Delta X_s)$ by $S_t[f]$ for an appropriate sequence of functions $f$. Finally, one uses the monotone class theorem, or Dynkin's lemma, to show measurability for all Borel sets $B$.

***

*Remark.* Judging by your previous questions, as well as the emphasized part of this question, you seem to be confused by the use of different $\sigma$-algebras. The above construction does not work in the framework of the product $\sigma$-algebras on the space $\mathbb R^{[0,\infty)}$ of *all* paths, because the set of càdlàg paths is not measurable with respect to the product $\sigma$-algebra. Instead, one works with $D([0, \infty), \mathbb R)$, the class of *càdlàg* paths, with the "cylindrical" $\sigma$-algebra $\mathcal A$ (which is just the previous product $\sigma$-algebra restricted to the non-measurable subset $D([0, \infty), \mathbb R)$). Finally, one augments this $\sigma$-algebra $\mathcal A$ with respect to an appropriate probability measure (or at least one considers the $\sigma$-algebra of universally measurable sets) in order to have various objects (such as hitting times) measurable.