Hi,
You are actually using extracting CIFAR dataset as i mentioned in the previous answer. CIFAR dataset has 50,000 training images and 10,000 testing images.
Use this for MNIST:
import torchvision
from torch.utils.data import DataLoader, Dataset, TensorDataset
dl_train = DataLoader( torchvision.datasets.MNIST(root, download=True, train=True),batch_size=1, drop_last=False, shuffle=False)
print(len(dl_train))