Calculating the numerical factor from Feynman diagram I kind of understood the symmetry factor quite well. However, I just do not understand how one can relate the Feynman diagram to the term (especially the numerical factor in front of it) in the expansion of the path integral.
I am reading about the Feynman diagram from the book "Quantum Field Theory in a Nutshell" by Antony Zee. I am now stuck at getting the numerical factor in the expansion of the transition amplitude using Feynman diagrams.
Considering the integral
$$Z(J)= \int_{-\infty}^\infty dq e^{-\frac{1}{2}m^2q^2-\frac{\lambda}{4!}q^4+Jq} \, .$$
Expand the Taylor's series in $\lambda$, we get
$$Z(J)= \int_{-\infty}^\infty dq e^{-\frac{1}{2}m^2q^2+Jq}\left[1-\frac{\lambda}{4!}+\frac{1}{2}\left(\frac{\lambda}{4!}\right)^2q^8+... \right] \, .$$
We can write this in term of the differential in $J$ as
$$Z(J)=\left[1-\frac{\lambda}{4!}\left(\frac{d}{dJ}\right)^4 +\frac{1}{2}\left(\frac{\lambda}{4!}\right)^2\left(\frac{d}{dJ}\right)^8+...\right] \int_{-\infty}^\infty dq e^{-\frac{1}{2}m^2q^2+Jq} \, .$$
Using the Gaussian integral, we finally obtain
$$\tilde{Z}(J)\equiv \frac{Z(J)}{Z(J=0)} =e^{\frac{\lambda}{4!}\left(\frac{d}{dJ}\right)^4}e^{\frac{1}{2m^2}J^2} \, .$$
We can get the term that contains a certain power in $\lambda$ and $J$ by expanding both exponentials in the above equation. For instance, if we want to have the term $\lambda \cdot J^4$, we get that term to be
$$ \frac{8!(-\lambda)}{(4!)^3(2m^2)^4}J^4 = \frac{35}{192}\frac{(-\lambda) J^4}{(m^2)^4} \, .$$
This term can be represented by the diagrams

The author clearly stated that 

I leave you to work out the rules carefully to get the numerical factor right.

I am not sure how I can get the numerical factor of this term. However, I have tried counting the number of the possible contractions,
In diagram (a), the number of the possible contraction is clearly $4! = 24!$.
In diagram (b), we start at the vertex. We choose 2 legs to contract with the sources, which gives $4\times 3=12$.
In diagram (c), we consider only the loop diagram on the right. The symmetry factor there is $8$. Hence the total number of the possible contractions is $\frac{4!}{8} = 3$.
Therefore, I conclude that the total number of ways of the contractions is $24+12+3=39$. But I cannot see any links to the numerical factor obtained from expanding the integral. 
This question is related to but different from Formula For Symmetry Factor.
 A: There are three points worth mentioning before answering your question:


*

*You are calculating disconnected contributions, so you have to account for the factors required for the connected parts to exponentiate

*Since you have no propagator the best you can hope for is to obtain the sum over all the symmetry factors for your chosen power of $J$ and $\lambda$

*In the path integral formulation the symmetry factors depend on whether you have differentiated the sources, $J$, and then set them to zero to produce correlation functions (such as in the related post), or not (such as here). 


Regarding point 3, ultimately, in your example you need four more derivatives with respect to $J$, after which you set $J=0$ to extract Greens functions, "$\langle qqqq\rangle$". More generally, this always produces a factor of n! in the numerator for $n$-pt connected Greens functions. (E.g., the symmetry factor, $1/4$, of the balloon in the presence of sources below becomes $1/4\times 2!=1/2$ in agreement with the related post.)
Having said that, here is how to think about $35/192$:
$$
\frac{35}{192}=\frac{1}{4!}+\frac{1}{4}\times \Big(\frac{1}{2}\Big)+\frac{1}{8}\times\frac{1}{2}\Big(\frac{1}{2}\Big)^2
$$
where the correspondence between the path integral and the Feynmann diagram factors is shown schematically in:

and the corresponding reasoning underlying the various factors (in addition to what you already know) is exhibited below. 
The factors of $1/2$ inside the parentheses in the figure come from the free propagator pieces, the factor of $1/2$ in the coefficient of the $(1/2)^2$ term (which is the free propagator squared) comes from the fact that this is from a disconnected diagram and in particular the third term in the expansion of the free propagation piece:
$$
e^{\frac{1}{2}GJ^2}=1+\frac{1}{2}G+\frac{1}{2}\Big(\frac{1}{2}GJ^2\Big)^2+\dots
$$
which is in turn multiplied by $\frac{1}{8}\times$(bubble diagram), etc. All in all, and filling in the remaining steps,
\begin{equation}
\begin{aligned} 
&\exp\Bigg\{\Big(\frac{1}{2}GJ^2\Big)-\lambda\Big[\Big(\frac{1}{4!}{\rm cross}\,J^4\Big)+\Big(\frac{1}{4}{\rm balloon}\,J^2\Big)+\Big(\frac{1}{8}{\rm double \,\,bubble}\Big)\Big]+\mathcal{O}(\lambda^2)\Bigg\}\\
&=\dots -\lambda\Bigg\{\Big(\frac{1}{4!}{\rm cross}\,J^4\Big)+\Big(\frac{1}{4}{\rm balloon}\,J^2\Big)\Big(\frac{1}{2}GJ^2\Big) +\Big(\frac{1}{8}{\rm double \,\,bubble}\Big)\frac{1}{2}\Big(\frac{1}{2}GJ^2\Big)^2\Bigg\}\\
&\qquad +\dots
\end{aligned}
\end{equation}
The exponent on the left-hand side of this equality is the generating function of connected Greens functions, $W(J)$, whereas the right-hand side is the generating function of disconnected Greens functions, $Z(J)$, whose coefficients' sums you computed (related via $Z(J)=e^{W(J)}$ in this convention).

Generalisation
A general and useful result for future reference is that a generating function of the form,

where, $U(J)=\frac{1}{\hbar}(W(J)-W(0))$, after carrying out the functional derivatives and re-exponentiating takes the diagrammatic form (ref):

The $\mathcal{O}(\hat{\lambda})$ term agrees with the above special case. To the best of my knowledge all coefficients in $U(J)$ are correct and all diagrams to the indicated order are included. Since it is purely combinatorial it also holds for arbitrary spacetime backgrounds and the couplings can in principle be arbitrary local functions at this stage.
A comment on $\hbar$
In $U(J)$ (after appropriate field redefinitions) $\hbar$ enters via $\ell=\hbar^{d/2}$ (with $d$ the spacetime dimension). 
Then, the entire $\ell$ power counting in $U(J)$ comes solely from
the source and bare couplings (see here for further detail). In particular, $J\sim \mathcal{O}(\ell^{-1})$ so that every external leg in a given diagram lowers the order of $\ell$ by one. The $\ell$-dependences of the couplings are then such that all tree diagrams are $\mathcal{O}(\ell^{-2})$, all one-loop diagrams are $\mathcal{O}(\ell^0)$, all two-loop diagrams are $\mathcal{O}(\ell^{2})$, etc., and a generic $L$-loop diagram in $U(J)$ is $\mathcal{O}(\ell^{2L-2})$. (This is why an $\hbar$ expansion is an expansion in loops rather than couplings, but this is somewhat implicit in $U(J)$ above. This is all made precise in here.)
