Let us assume that we have a certain capacity T.
We have an infinite number of random variables $X_1,X_2,\dots,$ where each $X_i$ is independent and has a particular pdf $P_i(X)$. And we have that $P[X_i≥0]=1$.
Now we are interested in the number of sucessive variables $X_i$ we can take until the capacity $T$ is used.
That is, we want to find a description for the random variable N such that $\sum_{i=1}^N X_i\leq T$ and $\sum_{i=1}^{N+1} X_i > T$.
I would like to find E[N] and Var[N] but I don't know how to do that.
Without the PDFs themselves, it's hard to proceed very far. We can observe that
$$ \begin{align} E(N) & = P(N = 1) + 2P(N = 2) + 3P(N = 3) + \cdots \\ & = P(N \geq 1) + P(N \geq 2) + P(N \geq 3) \cdots \end{align} $$
Let the PDF of $X_i$ be denoted by $f_i(x)$, and let also
$$ g_i = f_1 \ast f_2 \ast \cdots \ast f_i $$
where $\ast$ represents the convolution operation. Finally denote by $G_i$ the CDF corresponding to the PDF $g_i$. Then we can write
$$ E(N) = G_1(T) + G_2(T) + G_3(T) + \cdots $$
Similarly, we can also write
$$ Var(N) = G_1(T) + 3G_2(T) + 5G_3(T) + \cdots $$
Perhaps the above will give you enough to get started on whatever you're doing.