Constant sheaves on the étale site of a scheme I am learning étale cohomology with Tamme's book. When talking about example of abelian sheaves on the étale site, he mentions the following equality for an abelian group $A$ : let $A_X$ be the constant sheaf associated to $A$ on the étale site of $X$ and $X^{'}\to X$ an étale morphism of schemes, then
$A_X(X^{'})=\mathrm{Hom}_X(X^{'},\coprod_A X)=\prod_{\text{connected components of $X^{'}$}} A$
Now I checked the first equality, but I don't see how the second equality follows when the connected components of $X^{'}$ are not open. 
A related question to this is, what are sufficient conditions that ensure that every étale $X$-scheme has finitely many connected components ? It is necessary that $X$ has finitely many connected components, is it also sufficient ? To reformulate, we can, by pulling back to a connected component of $X$, ask the following : if $X$ is a connected scheme, does every étale $X$-scheme have finitely many connected components ?
I suspect it is false, I think we can look for a connected scheme with an open subscheme that has infinitely many connected components (that is something similar to $\mathbf{Q}\subset\mathbf{R}$), but the counterexample must lie outside the noetherian world and so also out of my comfort zone.
What about when X is noetherian ? I had the vague impression that an étale  $X$-scheme should then be noetherian, but I'm not so sure about that anymore...
 A: Regarding the first question, I've looked at the example Alex Youcis mentioned, that is $X=\mathrm{Spec}(B)$, $B=\prod_{\mathbb{N}}\mathbb{F}_2$ which is homeomorphic to $\{0,1\}^\mathbb{N}$ ; on that space we have a topology that is totally disconnected (see Qiaochu Yuan's blog post on boolean rings). Then we take $A=\mathbb{F}_2$ and compute :


*

*$A_X(X)=\mathrm{Hom}_X(X,X\coprod X)=\mathrm{Hom}_B(B\times B,B)$.
Now a B-linear map $\varphi \colon B\times B \to B$ is characterized by the image of $e_1=(1,0)$ and $e_2=(0,1)$ (since as an $B$-module, $B\times B=B\oplus B$), which we denote by $f_1$ and $f_2$, satisying certain conditions so that it is a ring map : $f_1 + f_2 = 1$, $f_1f_2=0$. This means exactly that $f_1$ are $f_2$ are a pair of associated idempotents, and so choosing an idempotent in $B$ determines the pair. Now since every element of $B=\prod_{\mathbb{N}}\mathbb{F}_2$ is idempotent, we have a bijection $A_X(X))\simeq \{0,1\}^{\mathbb{N}}$.

*On the other hand, since $X$ is totally disconnected,
$\prod_{\text{connected components of $X$}}\mathbb{F}_2 \simeq \mathbb{F}_2^{\mathrm{card}(X)}=\mathbb{F}_2^{\{0,1\}^{\mathbf{N}}}\simeq \{0,1\}^{\{0,1\}^{\mathbf{N}}}$
which means the LHS is in bijection with the powerset of $A_X(X)$, so it can't be isomorphic to the latter.
As for the second question, I'll cite the answer given by Alex Youcis in the comments for completness :

This is an old chestnut of a question. The answer is that you're right--the second equality doesn't a priori hold for arbitrary $X$. Note though that if $X$ is Noetherian since any étale map $Y \to X$ is locally of finite presentation you know that $Y$ is locally Noetherian. It's certainly not Noetherian in general since something like $\coprod_i \mathrm{Spec}(L_i)\to\mathrm{Spec}(K)$ is étale where the index set can be arbitrary. But, as this example shows, note that if $Y \to X$ is étale then we can get an étale cover of Y of the form $\coprod_i U_i\to Y$ where $U_i$ are Noetherian opens inside of $Y$. Then, on $\coprod_i U_i$ the desired equality does hold since each of the $U_i$ are Noetherian. So, if $X$ is Noetherian you have a cofinal system of étale covers for which the desired equality does hold, which is usually good enough in practice.

Edit : Actually if $X$ is only locally Noetherian, any étale $X$-scheme is also locally Noetherian, hence has open connected components since it is locally connected. Indeed, pick an étale $X$-scheme $Y$, $Y_0$ a connected component of $Y$ and $y\in Y_0$. Then $y$ has an affine open noetherian neighbourhood $U$, and $U$ is the finite union of its connected components, which must thus be open, and $y$ must belong to one of them, say $V$. Then $V$ has to be a subset of $Y_0$ and is open in $Y$.
