I decided to blog my thought process during this support challenge. :)
getPlayerInstantSpellCount returns the amount of spells a player has, (etc 7 spells) which you add to the variable count.
It then loops from 0 to that count-1, so etc 0,1,2,3,4,5 and finally 6. This is what will be stored in...