Let α and β be the two integral roots of x2+ax+a+1=0.
Then, α+β=−a ⋯(1)
αβ=a+1 ⋯(2)
Adding equations (1) and (2), we get
α+β+αβ=1
⇒(α+1)(β+1)=2
Since α and β are integral roots
∴α+1=1, β+1=2
⇒α=0, β=1
or
α+1=−1,β+1=−2
⇒α=−2,β=−3
From equation (1), we have
a=−1,5
Hence, total number of integral values of a is 2.