This work revisits the number of limit cycles (LCs) in a piecewise smooth system of Hamiltonian with a heteroclinic loop generalization, subjected to perturbed functions through polynomials of degree m. By analyzing the asymptotic expansion (AE) of the Melnikov function with first-order M(h) near the generalized heteroclinic loop (HL), we utilize the expansions of the corresponding generators. This approach allows us to establish both lower and upper bounds for the quantity of limit cycles in the perturbed system. Our analysis involves a combination of expansion techniques, derivations, and divisions to derive these findings.