  Consider real or complex polynomial Riccati differential equations $a(x) \dot
y=b_0(x)+b_1(x)y+b_2(x)y^2$ with all the involved functions being polynomials
of degree at most $\eta$. We prove that the maximum number of polynomial
solutions is $\eta+1$ (resp. 2) when $\eta\ge 1$ (resp. $\eta=0$) and that
these bounds are sharp.
  For real trigonometric polynomial Riccati differential equations with all the
functions being trigonometric polynomials of degree at most $\eta\ge 1$ we
prove a similar result. In this case, the maximum number of trigonometric
polynomial solutions is $2\eta$ (resp. $3$) when $\eta\ge 2$ (resp. $\eta=1$)
and, again, these bounds are sharp.
  Although the proof of both results has the same starting point, the classical
result that asserts that the cross ratio of four different solutions of a
Riccati differential equation is constant, the trigonometric case is much more
involved. The main reason is that the ring of trigonometric polynomials is not
a unique factorization domain.
