Word order in “出去了几个人。”
出去了几个人 is just a bit ambiguous. Are you making a statement or asking a question?


出去了几个人?  How many people went out?
出去了几个人 .  A few people left.
他们几个人出去了。 They went out together.
他们出去了几个人？How many of them went out?