Init: refactored countCollatzChains with lambda