Trying to understand length of Dataloader

I have a folder in which there are 670 folders,I have built a dataloader which will read these folders and also the images in them,The problem that i face is when i get the length of the dataloader,I get the value 21 and similar for the test case where there are originally 65 folders i get 3.

I am new to pytorch,so is there something that i may be doing wrong or is there a different interpretation of dataloader length.

Any help will be much appreciated.Thanks