DataLoader not workin properly

I tried checking the number of batches using the code in this post.

print('expected number of batches {}'.format(
    math.ceil(N / batch_size)))

And it printed out 6 batches as well.So not sure where the rest of the batches go?

Also I checked another example when I load 573 images, 144 images are trained(batch size 16, 9 batches). This equals 144 images. If we look at the ratio 144/573 its 25% approx, so is the ratio of 22/85 = 25%. So the rest of 75% images how can get those back?