Five, as far as anyone can pin down: Sonic, Shadow, Silver, Amy and Metal Sonic.
That count is a bit fuzzy at the edges — it depends on whether you include only mainline characters or every spin-off variant, and the series has accumulated plenty of the latter.