  Consider the vector field $x'= -yG(x, y), y'=xG(x, y),$ where the set of
critical points $\{G(x, y) = 0\}$ is formed by $K$ straight lines, not passing
through the origin and parallel to one or two orthogonal directions. We perturb
it with a general polynomial perturbation of degree $n$ and study which is the
maximum number of limit cycles that can bifurcate from the period annulus of
the origin in terms of $K$ and $n.$ Our approach is based on the explicit
computation of the Abelian integral that controls the bifurcation and in a new
result for bounding the number of zeroes of a certain family of real functions.
When we apply our results for $K\le4$ we recover or improve some results
obtained in several previous works.
