In this paper, we study the joint Laplace transform and probability generating functions of two pairs of random variables: (1) the two-sided first-exit time and the number of claims by this time; (2) the two-sided smooth exit-recovery time and its associated number of claims. The joint transforms are expressed in terms of the so-called doubly-killed scale function that is defined in this paper. We also find explicit expressions for the joint density function of the two-sided first-exit time and the number of claims by this time.Numerical examples are presented for exponential claims.
Li, S., Lu, Y., & Jin, C. (2016). Number of jumps in two-sided first-exit problems for a compound Poisson process. Methodology and Computing in Applied Probability, 18(3), 747-764. [1387-5841]. https://doi.org/10.1007/s11009-015-9453-8