TITLE: In Gromov-Witten theory, why is the string coupling constant weighted by $2g-2$?
QUESTION [11 upvotes]: Let $X$ be a Calabi-Yau threefold and let us fix a homology class $\beta\in H_2(X,\mathbb Z)$, just for simplicity. The generating series of Gromov-Witten invariants of $X$ in class $\beta$, $$\mathsf Z=\sum_{g}\textrm{GW}_{g,\beta}(X)\color{red}{u}^{2g-2},$$ has the variable $\color{red}{u}$, taking care of the varying genera, weighted by $\color{red}{2g-2}$. Some time ago, I remember having read this variable is called the string coupling constant, sometimes denoted $g_s$.

Question. Why is this variable weighted by $2g-2$, instead of, say, $g$? Is there a reason coming from Physics, maybe from String Theory?

I feel the reason why I cannot answer my question is that I do not really understand the meaning of $u$ (or $g_s$), or its role inside $\mathsf Z$. It seems not to be just a variable, or indeterminate, which one uses to write down $\mathsf Z$. It seems, for instance, that it makes sense to talk about "small values" of the coupling constant (which confuses me even more, since it is called a constant). I hope I made clear my confusion. And, my apologies for the non-research-level of the question.
Thanks you all.

REPLY [6 votes]: Here are two ways how physicists think about the string coupling constant:
1) In usual quantum field theory defined by quantization of a classical field theory, the partition function is defined by a path integral of the form
$Z= \int D\phi e^{\frac{S(\phi)}{\hbar}}$ where $S$ is the classical action. In particular, in the classical limit $\hbar \rightarrow 0$, we expect a localization around the classical solution $\phi_{cl}$ to classical equation of motion, and so a behaviour like $Z \sim e^{\frac{S(\phi_{cl})}{\hbar}}$, i.e.
$F=log(Z) \sim \frac{S(\phi_{cl})}{\hbar}$. Perturbative expansion in $\hbar$ will give a pertubative expansion of $F$. Standard Feynman diagram tecnhiques show that this expansion is of the form 
$F \sim \sum_{L} F_L \hbar^{L-1}$ where $F_L$ receives contribution from (connected) Feynman diagrams with $L$ loops.
We expect an open string theory to reduce at low energy to an usual quantum field theory with an expansion as above. But the closed string coupling $g_s$ is related to the open string coupling $\hbar$ by $g_s \sim \hbar^2$: this follows by unitarity from the annulus diagram which can be interpreted either as a one loop open string or a tree level closed string.
2) The point 1) is a spacetime point of view. There is also a worldsheet point of view. The non-linear sigma model is a two dimensional theory of maps from a two dimensional $\Sigma$ to a space $X$. The action of such theory has to be local and one natural term with this property is given by the integral of the curvature of $\Sigma$, which by Gauss-Bonnet is given by the Euler characteristic $2-2g$.
This origin of the appearance of the Euler characteristic is essentially the one mentioned in the answer given by Jim Bryan: additivity gives a way to reconstruct a global quantity from a local one.