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. CodeChef: Practical coding for everyone