Nothing in the description refers to individual neighbouring cells. All those numbers are counts -- if 0 to 2 of the neighbouring cells are rock, do this, etc.
You're talking about the post, or something in the source code?
In the post, it just counts how many of the 8 tiles are floor (which means 9 possibilities, including none of them). They aren't assigned index numbers.
Edit: ha, we all jumped on you. So now this is explained three different ways.