How to store counting variables in an array index.