The easiest way to understand this is to think in terms of the simplest visual patterns of groupings, in which 5 is a magic number, because everything in a list of 5 has a perfectly describable and consciously recognisable place.
Let me try to use words to demonstrate this, and imagine vertical, though horizontal is much the same.
Each position is perfectly mentally understood as either:
Top, bottom, middle
or:
Next to top and above middle
or
Next to bottom and below middle
This makes 5 objects the largest list of absolute positions instantly identifiable and classifiable by the viewer.
Got 6 items, there is no middle. A huge loss of reference.
At 7 items there are two objects between the top and the middle, the middle and the bottom. Much ambiguity.
Even 4 numbers is less preferable because the middle two objects are muddied in mental descriptiveness by the lack of a true middle.
Hence the magic of a list of five.