There's a formula for this: Where: - a is the maximum number of Berries that can appear on the plant - b is the minimum number of Berries that can appear on the plant - c is a number randomly chosen between a and b, inclusive - d is the number of growth stages during which the plant was watered

Source: Bulbapedia

I think the maximum is six, throughout my whole Pokemon Platinum experience I've only been able to grow berry plants with two berry plants on them.