Wrote a program to count the max out of an array