Collegedunia interview question

Count elememt in a array.