I am trying to calculate the average of an array list. So far the numbers are added together, however when I try to divide them by the size of the array, it does not work. 

Here is my code: 

```
public int mean (ArrayList<Integer> number)

{
    int sum = 0;
    int counter = 0;

    for (Integer meanInt :number)
    {
        sum+=meanInt;
        counter++;
    }
        return sum / counter;
}

```