As the computer will presumably 'counting' the items at checkout, I would have thought that anything in a box, like eggs, would count as one item, and the same with veg in a bag that is priced per bag, or even weighed as a bag. Things priced individually, however, such as bananas, I expect would be counted individually.
That's just my guess, but as some of you say that pickers/cashiers were actually opening sealed packs in order to limit you to 3 of that 'item', I guess it's all open to interpretation.
How does that work price-wise, by the way? I can see how they can simple re-weigh a bag of, say, carrots, that you had filled yourself with over the allowed number, but I seem to remember that in some cases they were actually opening pre-packed things, like eggs, to limit the number. I would have thought that they were on very sticky ground there with regard to weights and measures laws!