Let $\{S_n:n=1,2,\ldots\}$ be a renewal process (with the convention $S_0\equiv 0$) with $\mathbb E[S_1]<\infty$ and $S_1$ absolutely continuous with density $f$. Let $\{N(t):t\geqslant0\}$ be the associated counting process. I want to compute $$K(t):=\int_0^t N(s)\ \mathsf ds$$ but am not sure how to proceed for an arbitrary $f$.
Let's consider the Poisson process, i.e. $f(t)=\lambda e^{-\lambda t}$ where $\lambda>0$. Then as $N(t)\sim\mathsf{Pois}(\lambda t)$, we have $$\mathbb P(K(t)=0)=\mathbb P(S_1>t)=e^{-\lambda t} $$ and on $\{S_1\leqslant t\}$, \begin{align} K(t) &= \int_0^t N(s)\ \mathsf ds\\ &= N(t)(t-S_{N(t)})+\sum_{i=1}^{N(t)-1} N(S_i)(S_{i+1}-S_{i})\\ &= N(t)(t-S_{N(t)})+\sum_{i=1}^{N(t)-1} i(S_{i+1}-S_i). \end{align} The memoryless property yields that $t-S_{N(t)}\sim\mathsf{Exp}(\lambda)$, so conditioning on $N(t)$, we find that \begin{align} f_{K(t)\mathsf 1_{\{K(t)>0\}}\mid N(t)=n}(x) = \frac{(\lambda x)^{\frac{n(n+1)}2-1}}{\left(\frac{n(n+1)}2-1\right)!}\lambda e^{-\lambda x}, \end{align} so that $K(t)$ has a mixture Erlang distribution, with density \begin{align} f_{K(t)}(x) &= \sum_{n=1}^\infty f_{K(t)\mid N(t)=n}(x)\mathbb P(N(t)=n)\\ &= \sum_{n=1}^\infty \frac{(\lambda x)^{\frac{n(n+1)}2-1}}{\left(\frac{n(n+1)}2-1\right)!}\lambda e^{-\lambda x}\frac{(\lambda t)^n}{n!} e^{-\lambda t}. \end{align} That sum does not appear to have a closed form, so I'm not sure if there's an error in my computations or if it's best to consider Laplace transforms here.
This is not a complete answer, just a correction for the case of Poisson process.
Clearly, given $N(t) = n$, $$ K(t) = \sum_{k=1}^n (t-\tau_k), $$ where $\tau_k$ is the $k$th jump time. It is well known that, given $N(t) = n$, the jump times $\tau_1,\dots,\tau_n$ are distributed as order statistics $U_{(1)},\dots, U_{(n)}$ of an iid $U[0,t]$ sample $U_1,\dots,U_n$. Thus, $$ K(t) \overset{d}= \sum_{k=1}^n (t-U_{(k)}) = \sum_{k=1}^n (t-U_{k}) \overset{d}= \sum_{k=1}^n U_{k}. $$ Therefore, the characteristic function of $K(t)$ in this case is $$ \varphi_{K(t)}(s) = \sum_{n=0}^\infty \left(\frac{e^{ist}-1}{ist}\right)^n\frac{(\lambda t)^{n}}{n!}e^{-\lambda t} = \exp\left\{\lambda t\left(\frac{e^{ist}-1}{ist}-1\right)\right\}. $$