A well known result states that the degree of the tangent bundle $TX$ of a Riemann Surface $X$ of genus $g$ is exactly $2-2g$.
In my mind the genus is intuitively the number of "handles" of the surface, and precisely it is the dimension of the $\mathbb{C}$-vector space $\Omega_1(X)$ of holomorphic 1-forms on $X$. Googling around I noticed that the number $2-2g$ is the Euler characteristic of the surface.
Question 1 (Answered in the comments) I checked the relation for some small-genus surfaces by finding an explicit triangulation, but how can I prove it?
Then it comes the definition of degree of a line bundle $L$ over $X$. I can view it in two different, but equivalent, ways. On one hand it is the degree of the associated divisor on $X$ as in Hartshorne, on the other hand it is the "weighted" sum of zeroes of a general section, as in page 16 of those lecture notes. It is clear why the two definitions are the same and are independent from the choice of the general section.
The unique way I see for computing the degree of a line bundle is to find a "smart" section, but I failed to find one in this case of the tangent bundle.
Question 2 There are other effective ways to compute it? Otherwise what could be a good choice for a section?
I tried to keep the question as more general as possible because I´m more interested in a clarification of the notions involved than in a short proof of the statement of the title. Also hints or suggestions are more than welcome!
Thank you for your time!