Fix in package count calculation