The answer is 27
X1, X2, X3 main effects for two level categorical require 1 each
X4 and X5 main effects for three level require 2 each
X1*X2 and X1*X3 and X2*X3 two way interactions between the two level factors require 1 each
X1*X4 and X1*X5 and X2*X4 and X2*X5 and X3*X4 and X3*X5 two way interactions between the two and three level factors require 2 each
X4*X5 two way interactions between the two three level factors require 4
plus 1 for the y-intercept
I just use the simulate responses under the red triangle and look at the resulting report to get this.