Bounding the number of zeros of certain Abelian integrals