Goodness. Obviously, the 4,000 man army is split in to smaller groups. Which is why one small group can keep moving throughout the battlefield, while the other larger group is already awaiting the Wessex armies move towards the boats. Hence Floki telling Ivar "You were right, they're going for the boats"