You need to describe what has made the experiment stop at that result.
If $min, max, N, Sum$ are all positive, perhaps somebody was aiming at $Sum$ with the intention of restarting the experiment if they had missed $Sum$ after $max$ throws knowing they would never hit it. Then you could work out the probability of hitting $Sum$ after a given number of steps, and this would give you a distribution for $N$.
So in your example of a standard fair die, you would have for example a probability of hitting $Sum=30$ with $N=5$ of $\frac{1}{6^5}$, a probability of $N=10$ of $\frac{2930455
}{6^{10}}$, and a probability of $N=29$ of $\frac{29}{6^{29}}$, etc. [This Java applet counts compositions, for example with "Compositions of" 30, "Exact number of terms" 10, and "Each term no more than" 6, though there are other approaches.] Add up the probabilities and they come to about $0.28569$, so you need to divide them each by this to give a distribution with a total probability of $1$.
You will find that the mean is about $8.81$, the median $9$ and the mode $8$. You would not have been far away with the simpler approximation $\frac{Sum}{(min+max)/2}$ which in this case is about $8.57$. The intervals $[6,11]$ and $[7,12]$ each cover just over 95% of the probability.