Is this correct grammar? Sarah has 6 oranges. Ted has 7 oranges. How many oranges do they have altogether?

Yes. It's correct.