Why does Salsa20 algorithm require incrementing word[8] and word[9] after producing cipher text message
This code only increments word 9 when word 8 is zero. Just like when counting you increment the next digit whenever the previous digit is zero, going from 9 to 10.

This is equivalent to having a 64-bit counter and putting the lower half into word 8 and the upper half into word 9.