Shall I consider the following sentences as gramatically wrong?

1) How many times do you do your homework after dinner? (instead of "how often")
2) I always do my homework with attention (instead of "carefully")
3) I think that two thousand three (2003), nineteen hundred five (1905) are only possible in AmE.
4) Twice a week I go to the gym : I go to the gym twice a week.

I don't think any of these sentences have grammatical errors.

1, 2, and 4 are a bit wordy (your wording in parentheses is more concise).