Use count on array of functions instead of math increased counter