Infosys interview question

Program to count integers in array