Loitering does not have to involve two or more people being gathered somewhere. Loitering means that a person (or possibly multiple people) are just standing around in a place where they have no legitimate reason to be.
Not necessarily, a specific number of people is not required. You can certainly loiter all by yourself, or in a large group. If you're hanging around in a public place with no real reason to be there, you're loitering.