Falting's Theorem states that algebraic curves of genus $g>1$ have only finitely many rational points on them. But how exactly is $g$ defined here?
The notion of genus here obviously shouldn't come from considering singular homology of the solution set, which is necessarily discrete as a subset of $\mathbb Q^2$. How is the genus defined, then? I looked this up on wikipedia but it isn't explained very clearly anywhere. My guess was that it should be arithmetic genus, where in the article it is implied that $$ g= (-1)^n (\chi(\mathcal O_C)-1)$$ But what's $n$? And what should be the structure sheaf $\mathcal O_C$? Perhaps etale sheaf, with $\chi$ calculated as alternating sum of its dimensions...? (I only know etale cohomology concept superficially; I'm only guessing that this should be the case because etale cohomology appeared as a natural cohomology theory for "arithmetic" curves)
But really, I'm confused. How is $g$ defined?