Let $a$ and $b$ be complex numbers such that $(a+1)(b+1)=2$ and $(a^2+1)(b^2+1)=32.$ Compute the sum of all possible values of $(a^4+1)(b^4+1).$

Let's think step by step and output the final answer within \boxed{}.
user