TITLE: Cohomology and Global Sections
QUESTION [6 upvotes]: For a topological space X, $ \  H^0 (X, \Bbb Z)$ tells you about the connected components of $X$. For a sheaf $\mathcal O_X$ on $X$, $H^0 (X, \mathcal O_X)$ is usually written to refer to global sections of your sheaf. Sorry if I'm being dense, but what is the connection? Are global sections like connected components in some sense? Also let me know if this question is imprecise, my experience with sheaves is limited.

REPLY [3 votes]: You can compute cohomology with coefficients in the "constant sheaf" $\Bbb Z$, and this will be the same as singular/simplicial/cellular cohomology.