In any binomial expression, the number of terms is always one more than power of the expression.
Examples:
(x+y)^1 will give 1+1 = 2 terms
(x+y)^2 will give 2+1 = 3 terms
The given expression is:
(a-b)^8
The power of the expression is 8 which means that:
number of terms = 8+1 = 9 terms