On the number of limit cycles of a class of polynomial differential systems