Consider this: I am trying to send the contents of a book to someone through the post, using only postcards. So I must split the book up into N parts. For each post card I send, the recipient must also send a postcard back, acknowledging that they received it (within an arbitrary timeframe). There is a probability P for every postcard that it will get lost, and for each of these lost cards I must resend a postcard with that same letter section until it is received.
My question is, how might I calculate the number of postcards I must send (lets say T), in terms of N and P?
If $p$ is the probability that a postcard gets lost in transit, then the probability that a particular section of book is successfully sent at $m$-th attempt is: \begin{align} Q_m\equiv p^{m-1}(1-p) \end{align} assuming that each sending event is independent of others. You want the probability that a total of $M$ postcards need to be sent so that the entire book is received. Obviously, we cannot have $M<N$, i.e. $P(M|N)=0$ for $M<N$. Therefore consider the case $M\geq N$.
Now consider partitioning $M$ into a sum of $N$ numbers using only positive integers excluding zero. For example for $N=3$ and $M=5$, one possible partition is $M=5=1+1+3$. Let $\Phi(M,N)$ be the collection of ordered sets whose elements are $M$ partitions of $N$. Again for $N=3$ and $M=5$ we have: \begin{align} \Phi(M=5,N=3)=\{(1,1,3),(1,3,1),(3,1,1),(1,2,2),(2,1,2),(2,2,1)\} \end{align} Each ordered set tells you how many attempts were required to send each section (in the example above there are only $N=3$ sections). For example $(1,1,3)$ means that each of first two sections was sent in 1 attempt, but the last section required 3 attempts before it was sent successfully. Let us call each ordered set, such as $(1,1,3)$, as the "sequence of number of attempts".
For a particular sequence of number of attempts, $\{m_1,m_2,...,m_N\}$, the corresponding probability is $Q_{m_1}\times Q_{m_2}\times ...Q_{m_N}\equiv Q'_{\{m_1,m_2,...,m_N\}}$. The total probability that $M$ postcards were sent is equal to sum of such probabilities for each distinct sequence of number of attempts: \begin{align} P(M|N)=\sum_{\mathbf{X}\in\Phi}Q'_{\mathbf{X}} \end{align}
For even moderately large $N$ this is difficult to work out by hand, and you may wish to use some software like Mathematica to calculate the probabilities.