Your calculation is a bit wrong, since you are dividing the number of batches by the batch size:
len(dataloaders['train'].dataset)=236436
len(dataloaders['train'])=59109
len(dataloaders['train'])/opts.batch_size=14777.25 # this is wrong
len(dataloaders['train'].dataset) / opts.batch_size = 59109 # 236436 / 4 = 59109