Eight in multiplayer: Sonic, Tails, Knuckles, Amy, Shadow, Cream, Silver, and Blaze. The main story mode, however, is Sonic-only.
That split is worth knowing before you pick it up, since the character variety is confined to the party and versus modes rather than the campaign. If you're after a Sonic title with multiple playable leads across the story, earlier entries like Sonic Adventure 2 or Sonic Heroes fit that better.