Limit cycle bifurcations from a nilpotent focus or center of planar systems