Tiny refactoring of totalChunks calc.