Number of arrivals of a compound Poisson process?

I am trying to wrap my head around calculating the number of arrivals of a compound process. Supposed we have events arriving at Poisson rate $\lambda$, I know that the number of arrivals $N(t)$ obeys the Poisson distributions

To extend to the example of a compound Poisson, let's say upon arrival, each event will join a queue with waiting time $Q_i$ where $Q_i$s are i.i.d with a distribution, something like $R$.

How would you determine the number of events in the queue - i.e. $N_Q(t)$?