Geometric invariants of a scheme

Following my previous question about sheaf cohomology, I'd like to ask about its applications to algebraic geometry. I have now learned a little about homological algebra and I can see that for ordinary topological spaces $X$, $$H^0(X, A) \cong \Gamma(X, \Delta(A))$$ where $A$ is any abelian group, $\Delta(A)$ is the constant sheaf of $A$ on $X$, and the $H^0$ appearing on the LHS refers to singular cohomology, so it is quite plausible to me that the higher cohomology groups should also coincide.

Of course, the trouble is that a scheme is more than just a topological space; in some sense the underlying space is irrelevant and simply provides a setting on which the structure sheaf can be defined. How does one recapture the traditional geometric invariants of, say, a complex variety in the world of algebraic geometry?

To be a bit more precise, suppose $X$ is a smooth projective algebraic variety over $\mathbb{C}$, viewed as a scheme. It seems highly implausible to me that $H^i(X, \mathbb{Z})$ (in the sense of either singular cohomology or sheaf cohomology) should yield anything of interest, given the coarseness of the Zariski topology. However, as I understand it, it is still possible to compute geometric invariants (e.g. Euler characteristic, genus, Betti numbers) of the associated complex manifold using the machinery of algebraic geometry. How is this done, and why does it work?

I really haven't learned very much about algebraic geometry (or its history), so forgive me if I'm asking questions about some very deep results!

-

First of all you are completely right abour the woefully inappropriate character of sheaf cohomology of constant sheaves on algebraic geometric varieties endowed with their Zariski topology: if a scheme (or variety) $X$ is irreducible, all higher cohomology groups $H^i(X, \mathbb Z_X) \quad$ ($\mathbb Z_X$= constant sheaf) vanish for $i\gt0$ because $\mathbb Z_X$ is flabby, hence acyclic.
There are several possible remedies to this unsatisfactory situation, for example:

Analytification
If $X$ is defined over $\mathbb C$, there is a functorial way of associating to it a complex analytic space $X(\mathbb C)$, with a classical topology : for example if $X$ was smooth ( a purely algebraic notion) then $X(\mathbb C)$ will be a holomorphic manifold and a fortiori a topological manifold. Then you can apply all tools of algebraic topology: singular cohomology, homotopy theory,...

Coherent cohomology
If $X$ is projective and smooth (say), you can calculate the topological invariants of $X(\mathbb C)$ you are interested in (Euler characteristic, genus, Betti numbers) directly on $X$ by using the cohomology of coherent sheaves like $\Omega_X^n$, the sheaf of differential $n$- forms on $X$. Let me emphasize that these calculations are made entirely in the algebraic category, that is by using the Zariski topology.

Etale cohomology
This is one of Grothendieck's most brilliant insights in his career.
By slightly changing the notion of topology, Grothendieck showed that you can define a reasonable theory of cohomology with constant coefficients for all schemes. If the scheme happens to be a variety over $\mathbb C$, Mike Artin proved a comparison theorem to the effect that you get the same invariants as through analytification.
You might be interested by this question and its answers on MathOverflow on the theme of étale cohomology, where you will also find a link to Milne's fine online free notes on the subject.

Illustration
Let $X$ be a complete smooth connected curve over the algebraically closed field $k$. Let us calculate its genus $g$ by the three methods above.
Analytification: If $k=\mathbb C$, use $rank_{\mathbb Z}H^1(X(\mathbb C),\mathbb Z)=2g$.

Coherent cohomology : Use the formula $g=dim_{\mathbb C}H^1(X,\mathcal O)$ or also $g=dim_{\mathbb C}H^0(X,\Omega_X^1)$

Etale cohomology: Choose any prime $p\neq char.k$ and use $H^1_{étale}(X,\mu_p)=(\mathbb Z/p\mathbb Z)^{2g}$, where $\mu_p$ is the sheaf on $X$ (in the étale topology) of $p$-th roots of unity.

Bibliography
Neeman, Algebraic and analytic geometry For analytification.
Wells, Differential analysis on complex manifolds For Hodge theory.

-