We are given that A and E are at the ends of a straight line, and there are 3 people standing in between them.
If A and E are the two end positions, then we count as follows:
This means there are 3 people between A and E, plus A and E themselves.
Thus, the total number of people in the group is 5.