Let $X$ be the set of solutions to $x_1^2+\ldots+x_n^2=1$ in $\mathbb{C}^n$. This has real dimension $2(n-1)$, but since $X$ is an affine algebraic variety, the only possible non-zero topological Betti numbers of $X$ are $b_0,\ldots,b_{n-1}$.
What is the top Betti number $b_{n-1}$?
The real sphere $S^{n-1}$ embeds in $X$, determining a class in $H_{n-1}(X,\mathbb{Q})$. I wonder if this class actually spans the homology group.
I have seem some results on Betti number for projective hypersurfaces, but not for affine ones.
This complex sphere deformation retracts onto the real sphere $S^{n-1}$ inside it, so they're homotopy equivalent, and in particular they have the same Betti numbers. To see this very explicitly, write $x_k = a_k + i b_k$, write $a = (a_1, a_2, \dots) \in \mathbb{R}^n$, and write $b = (b_1, b_2, \dots) \in \mathbb{R}^n$. The defining equation is a pair of equations
$$||a||^2 = 1 + ||b||^2$$ $$a \cdot b = 0$$
and we want to deformation retract this thing onto the subspace where $b = 0$. To do this we'll send $b$ to $(1 - t) b$, where $t \in [0, 1]$, and send $a$ to $f(t) a$ where $f(t)$ is a function chosen to have the property that the first equation still holds. This means that we want $||a||^2 = 1 + ||b||^2$ to imply
$$f(t)^2 ||a||^2 = f(t)^2 (1 + ||b||^2) = 1 + (1 - t)^2 ||b||^2$$
which gives
$$f(t) = \sqrt{ \frac{1 + (1 - t)^2 ||b||^2}{1 + ||b||^2} }.$$
As a sanity check, when $n = 0$ the space of solutions is two points, which is $S^0$, and when $n = 1$ the space of solutions is $\mathbb{C}^{\times}$ (rewrite the defining equation as $(x_1 + i x_2)(x_1 - i x_2) = 1$), which deformation retracts onto $S^1$.