If in doubt, always call your vet or the Animal Poison Line immediately.
The exact toxic compound in grapes is still unknown, which makes them particularly dangerous : there is no established safe amount. Some dogs have died after eating just a handful while others have shown no reaction to larger amounts. The risk is never worth taking.
Call your vet immediately even if your dog only ate one or two grapes. Do not wait for symptoms to appear : kidney failure can develop rapidly.