Replace $m$ with $n-k$ in the inequalities $k\leq 2m$ and $m \leq 2k$ to get $\frac{n}{3} \leq k \leq \frac{2n}{3}$. Since $k$ is an integer, $k$ can range from $\lceil \frac{n}{3} \rceil$ to $\lfloor \frac{2n}{3} \rfloor$, inclusive.
Notice that each term in the sum is either $a^2b$ or $ab^2$ (due to condition #3). Suppose that there are an $y$ number of terms $a^2b$ (and therefore $n-y$ number of terms $ab^2$). Therefore, every possible sum $x_nx_1x_2+x_1x_2x_3+...+x_{n-1}x_nx_1$ has the form $(a^2b)(y)+(ab^2)(n-y)$. Since $a,b,n$ are fixed and the expression is linear with respect to $y$, there is a bijection between the values for the sum and the values for $y$.
We can count the number of a's in a sum to be $(2)(y)+(1)(n-y) = 3k$ (since each is counted three times), which implies that $y = 3k-n$, which is linear to respect to $k$, so there is a bijection between the values for $y$ and the values for $k$. Therefore, the number of possible values for the sum is just equal to the number of possible values for $n$, which would just be $\boxed{\lfloor \frac{2n}{3} \rfloor - \lceil \frac{n}{3} \rceil + 1}$.