Add helper function to calculate length of collatz sequence; spec for helper fun.