  We compute the cyclicity of open period annuli of the following generalized
Rayleigh-Li\'enard equation $$\ddot{x}+ax+bx^3-(\lambda_1+\lambda_2
x^2+\lambda_3\dot{x}^2+\lambda_4 x^4+\lambda_5\dot{x}^4+\lambda_6
x^6)\dot{x}=0$$ and the equivalent planar system $X_\lambda$, where the
coefficients of the perturbation $\lambda_j$ are independent small parameters
and $a, b$ are fixed nonzero constants. Our main tool is the machinery of the
so called higher-order Poincar\'e-Pontryagin-Melnikov functions (Melnikov
functions $M_n$ for short), combined with the explicit computation of center
conditions and the corresponding Bautin ideal.
  We consider first arbitrary analytic arcs $\varepsilon \to
\lambda(\varepsilon)$ and explicitly compute all possible Melnikov functions
$M_n$ related to the deformation $X_{ \lambda(\varepsilon)} $. At a second step
we obtain exact bounds for the number of the zeros of the Melnikov functions
(complete elliptic integrals depending on parameter) in an appropriate complex
domain, using a modification of Petrov's method.
  To deal with the general case of six-parameter deformations $\lambda \to
X_\lambda$, we compute first the related Bautin ideal. To do this we carefully
study the Melnikov functions up to order three, and then use Nakayama lemma
from Algebraic geometry. The principalization of the Bautin ideal (achieved
after a blow up) reduces finally the study of general deformations $X_{ \lambda
} $ to the study of one-parameter deformations $X_{ \lambda(\varepsilon)} $.
