First encounters with sheaves: could you tell me if my thoughts are correct? Let $X=\mathbb R$ be the reals and $\mathbb Z$ the integers (with the discrete topology). 

Do I understand correctly the definition of sheaf?

Here is how I understand it (illustrated by a concrete example):
The constant sheaf, $\mathbb Z_X$, is a collection of pairs $(U,\mathcal F(U))$ where $U$ is an open set in $X$ and $\mathcal F (U)$ is the set of all functions $f: U \to \mathbb Z$ such that $f$ is locally constant. 
Next, I want to prove that this sheaf does not have the following property:
For all $C \subset U \subset X$ ($C$ closed, $U$ open) and all $f\in \mathcal F(U)$ there exists an open set $V$ with $C \subset V \subset U$ and $F \in \mathcal F (X)$ with $f\mid_V = F\mid_V$.

Is my counterexample correct?

Counter example: 
Let $C = \{{1\over 2}, {3\over 2}\}$. Let $U = (0,1)\cup(1,2)$ and $f: U \to \mathbb Z$ be the function $f\mid_{(0,1)} = 0$ and $f\mid_{(1,2)}=1$. Since $X$ is connected, $F\in \mathcal F(X)$ has to be constant. But then $F$ cannot equal both $f\mid_{(0,1)} = 0$ and $f\mid_{(1,2)}=1$.
 A: The definition of a sheaf is far more broad than the example you have mentioned. In general your $\mathcal{F}(U)$ can be any group (or ring or algebra for example), and if $U\subset V$ then there is a restriction map $res_{V,U}:\mathcal{F}(V)\rightarrow \mathcal{F}(U)$ satisfying some natural identity and composition conditions. To be a sheaf we must also have an identity and gluing condition. That is, if $U=\cup U_i$ and $f\in \mathcal{F}$ where $res_{U,U_i}(f)=0$ for all $i$, then $f=0$. Contrastingly, given $f_i\in \mathcal{F}(U_i)$ which agree on overlaps, we can always find an $f\in \mathcal{F}(U)$ such that $res_{U,U_i}(f)=f_i$. These two together say that you can glue together the pieces in at least one way, and by uniqueness this can be done in at most one way. Think of the sheaf of smooth functions on a manifold for example. A sheaf allows you to define things locally, and glue these pieces together into something global.
Now for your example, I am assuming you are not using the Zariski topology on $\mathbb{R}$. In this case your example is correct. If you are supposed to be using the Zariski topology then you can't separate points as you have since the topology is not Hausdorff.
