Just create an instance before passing it to the DataLoader and print the length:
dataset = ImageDataset("F:/CycleGAN/datasets/datasets-master/horse2zebra/train/%s" % opt.dataset_name, transforms_=transforms_, unaligned=True)
print(len(dataset))