added counting of bodies to support early canceling