E. Yet Another Array Counting Problem