counting integers in an array