Every change to a Deployment's Pod template is recorded as a revision. kubectl rollout history deployment/NAME lists them, and kubectl rollout undo returns to the previous template: the old ReplicaSet, which Kubernetes kept with zero Pods, scales back up. --to-revision=N jumps to a specific one, and the rollback itself becomes a new revision.
Revisions hold the template only. Replica counts are not part of them, so undoing a release after a scale-up keeps the new count. Restarting or deleting Pods doesn't help either: the controller recreates them from the same broken template.
Rolling back is not always right. When the new version carries a fix the business needs and only a setting is missing, fixing forward, adding the setting so the stuck rollout completes, is often better. Read the crashing container's logs with kubectl logs POD --previous to see what it needs.
Back one revision, or to a chosen one.