Criticality and condensation in a non-conserving zero-range process