Let $f:M\to \Bbb{R}$ be a Morse function, where $M$ is a $k$-manifold. The index $i_{f,p}$ is defined to be the number of negative eigenvalues of the Hessian $H_f$ at the critical point $p$. For instance, let $f:\Bbb{D}^2\to\Bbb{R}$ be defined as $(x,y)\to x+y$. Then there are no critical points of this function, and the Hessian $\begin{pmatrix} 0&0\\0&0\end{pmatrix}$ has no negative eigenvalues.
The Euler characteristic of $M$ is defined to be $\sum\limits_{i=0}^n {(-1)^i T_{f,i}}$, where $T_{f,i}$ is the number of critical points of index $i$.
I wonder why this is a valid definition. For example, we know that the Euler characteristic of $\Bbb{D^2}$ is $1$. However, the map $f:\Bbb{D^2}\to\Bbb{R}$ has no critical points. Hence, according to the formula above, its Euler characteristic should come out to be $0$. Isn't this a contradiction?
Here is a correct statement. Let $M$ be a compact manifold with boundary. Let $f,g$ be a pair of a Morse function and metric such that $-\nabla f\pitchfork \partial M$. Assume now that the negative gradient flow points inwards at the boundary. Then the alternating sum of the number of critical points of index $k$ equals the Euler characteristic of the manifold. If the gradient points outwards, the same holds, but you should compute the Euler characteristic of the manifold relative to the boundary.
You can see now what should be true for your example I think.