You need to use the variables before all operators. So something like this:
{if(sum(Q1, Q2, Q3, Q4, Q5, Q6. Q7, Q8, Q9, Q10) >= 5 AND sum(Q1, Q2, Q3, Q4, Q5, Q6. Q7, Q8, Q9, Q10) <= 9, 'Something if true.', 'Something if untrue.')}