Let f(1)=x. From f(1)+f(2)=1, we get f(2)=1−x. From f(2)+21f(3)=1, we get f(3)=2(1−f(2))=2x. From f(3)+31f(4)=1, we get f(4)=3(1−f(3))=3−6x. The codomain is {a∈Z:∣a∣≤8}, so every value must satisfy ∣f(k)∣≤8. Since f(3)=2x, we need ∣2x∣≤8, so −4≤x≤4. Since f(4)=3−6x, we need ∣3−6x∣≤8. Thus −8≤3−6x≤8, which gives −65≤x≤611. With x∈Z, this reduces to x=0 or x=1. For x=0, the function is f(1)=0,f(2)=1,f(3)=0,f(4)=3. For x=1, the function is f(1)=1,f(2)=0,f(3)=2,f(4)=−3. Both functions satisfy all three given equations and lie in the given codomain. Therefore, the number of such functions is 2.