The range needs to be greater than the number of items in the list, or it simply won't work. As a rule of thumb, if your scroll view can display 5 items at a time, you should have 7 items inside it -- padding of 1 on each end.
Real index is just an offset, as I said. It doesn't represent your data index, whatever that is. You can use it to calculate your data index, however. For example if your data is always 0 to 4 range, you can just take the real index and mod it by 5 (abs(real) % 5). I don't know what your "data index" is, so I can't suggest anything specific.