On calculating sterility in thermal and non-thermal preservation methods