Switch to an array, not an object, for the counter