compute folder length in separate function, to avoid irrelevant length due to the fact that the collection is not fully complete