Let $P(X,Y)=X^2+2aXY+Y^2$ be a real polynomial where $|a|\geq 1$. For a given positive integer $n$, $n\geq 2$ consider the system of equations:  \[ P(x_1,x_2) = P(x_2,x_3) = \ldots = P(x_{n-1},x_n) = P(x_n,x_1) = 0 . \] We call two solutions $(x_1,x_2,\ldots,x_n)$ and $(y_1,y_2,\ldots,y_n)$ of the system to be equivalent if there exists a real number $\lambda \neq 0$, $x_1=\lambda y_1$, $\ldots$, $x_n= \lambda y_n$. How many nonequivalent solutions does the system have? 

[i]Mircea Becheanu[/i]
**
   - If any \( x_i = 0 \), then all \( x_i = 0 \) for \( i = 1, 2, \ldots, n \). This is because if \( P(x_i, x_{i+1}) = 0 \) and \( x_i = 0 \), then \( x_{i+1} \) must also be 0 to satisfy the equation \( P(0, x_{i+1}) = x_{i+1}^2 = 0 \). Thus, the trivial solution is \( x_i = 0 \) for all \( i \).

2. **Non-trivial Solutions:**
   - Suppose no \( x_i \) is 0. We analyze different cases based on the value of \( a \).

3. **Case 1: \( |a| > 1 \) and \( n \geq 3 \):**
   - Given \( P(X, Y) = X^2 + 2aXY + Y^2 \), we have \( P(x_i, x_{i+1}) = 0 \) for all \( i \).
   - Since \( P(x_i, x_{i+1}) = 0 \), the roots of the quadratic equation \( t^2 + 2ax_i t + x_i^2 = 0 \) are \( x_{i-1} \) and \( x_{i+1} \).
   - This implies \( x_{i-1} x_{i+1} = x_i^2 \).
   - Therefore, \( \frac{x_i}{x_{i+1}} = k \) for some constant \( k \). Taking the product over all \( i \), we get \( k^n = 1 \), implying \( k = 1 \) or \( k = -1 \) when \( n \) is odd or even, respectively.
   - However, substituting \( k = 1 \) or \( k = -1 \) into the equation \( x_{i-1} + x_{i+1} + 2a x_i = 0 \) leads to a contradiction because \( |a| > 1 \). Thus, there are no non-trivial solutions in this case.

4. **Case 2: \( a = -1 \):**
   - The equation becomes \( P(X, Y) = (X - Y)^2 = 0 \).
   - This implies \( X = Y \). Therefore, \( x_i = x_{i+1} \) for all \( i \), leading to \( x_i = p \) for some non-zero constant \( p \).
   - Any other non-trivial solution is equivalent to this solution by scaling.

5. **Case 3: \( a = 1 \):**
   - The equation becomes \( P(X, Y) = (X + Y)^2 = 0 \).
   - This implies \( X = -Y \). Therefore, \( x_i = -x_{i+1} \) for all \( i \).
   - For \( n \) to be even, we can have \( x_{2i+1} = p \) and \( x_{2i} = -p \) for some non-zero constant \( p \).
   - Any other non-trivial solution is equivalent to this solution by scaling.

6. **Special Case: \( n = 2 \):**
   - For \( n = 2 \), the system reduces to \( P(x_1, x_2) = P(x_2, x_1) = 0 \).
   - This implies \( x_1^2 + 2a x_1 x_2 + x_2^2 = 0 \).
   - Solving this quadratic equation, we get \( x_1 = \pm x_2 \) when \( a = -1 \) or \( a = 1 \).

Conclusion:
- For \( |a| > 1 \) and \( n \geq 3 \), there are no non-trivial solutions.
- For \( a = -1 \), there is one non-trivial solution up to equivalence: \( x_i = p \) for some non-zero constant \( p \).
- For \( a = 1 \), there is one non-trivial solution up to equivalence for even \( n \): \( x_{2i+1} = p \) and \( x_{2i} = -p \) for some non-zero constant \( p \).
- For \( n = 2 \), the solutions are \( x_1 = \pm x_2 \).

The final answer is \( \boxed{1} \) non-equivalent solution for \( a = -1 \) and \( a = 1 \) when \( n \) is even.