count of maximum

why code chef is giving wrong answer for my code… while it is giving correct answer on my compiler.
please check my code once. http://www.codechef.com/viewsolution/4261658