They probably base it upon a quick directory scan to obtain the count. Then set the progressbar max to that and proceed to start checling each file.