The DDI Compendium states for the Swarm trait:
The swarm can occupy the same space as
another creature, and an enemy can
enter its space, which is difficult
terrain. The swarm cannot be pulled,
pushed, or slid by melee or ranged
attacks. It can squeeze through any
opening that is large enough for at
least one of the creatures it
comprises.
And for flanking:
Combat Advantage: You have combat
advantage against an enemy you flank.
Opposite Sides: To flank an enemy, you
and an ally must be adjacent to the
enemy and on opposite sides or corners
of the enemy’s space. When in doubt
about whether two characters flank an
enemy, trace an imaginary line between
the centers of the characters’
squares. If the line passes through
opposite sides or corners of the
enemy’s space, the enemy is flanked.
Must Be Able to Attack: You and your
ally must be able to attack the enemy,
whether you’re armed or unarmed. If
there’s no line of effect between your
enemy and either you or your ally, you
don’t flank. If you’re affected by an
effect that prevents you from taking
actions, you don’t flank.
Large, Huge, and Gargantuan Creatures:
If a flanking creature’s space takes
up more than 1 square, the creature
gains combat advantage if any square
it occupies counts for flanking.
So I'd say there's no restriction for flanking swarms in the rules, though I can certainly see how it could be more difficult in "real life" than flanking a normal-sized creature.