First thing, Arrays start at 0, not 1 so change
for (int i = 1; i < slots; i++)
to
for (int i = 0; i < slots; i++)
Do the same for both loops.
Secondly, Can you please answer My question regarding count value on the array, and answer CHill60's question regarding the contents of the array!