1. Don't eat too much apples before going to bed.

2. Don't eat too many apples before going to bed.

(Which one is grammatical?)

3. His hobby is riding a horse.
4. His hobby is to ride a horse.
5. His hobby is riding on a horse.
(Are all grammatical?)

6. His job is selling cars.
7. His job is to sell cars.
(Are both correct?)

#1 is grammatical.

#3 is grammatical

#6 and 7 are both grammatical but #7 is better usage.

#1 is incorrect; #2 is correct.

"Apples" = a count noun:
http://grammar.ccc.commnet.edu/grammar/noncount.htm

1. Both sentences are grammatical, but they have different meanings. The first sentence, "Don't eat too much apples before going to bed," is incorrect because "apples" is a plural noun and should be preceded by the plural article "many." The correct sentence is: "Don't eat too many apples before going to bed." This sentence means that you should not consume a large amount of apples before going to bed.

2. The second sentence, "Don't eat too many apples before going to bed," is grammatically correct. It means that you should avoid consuming a large quantity of apples before going to bed.

3. All three sentences are grammatically correct, but they have slightly different meanings. "His hobby is riding a horse" means that riding a horse is his hobby in general.

4. "His hobby is to ride a horse" is also grammatically correct, but it implies that riding a horse is his specific chosen activity or preference in terms of hobbies.

5. "His hobby is riding on a horse" is grammatically correct, but it may sound a bit unusual or unclear. It could be interpreted as riding on top of a horse rather than riding it. It is recommended to use the first or second sentence for clarity.

6. Both sentences are grammatically correct, and they convey the same meaning. "His job is selling cars" means that selling cars is his profession.

7. "His job is to sell cars" is also grammatically correct, and it has the same meaning as the previous sentence. It implies that his task or duty is to sell cars. Both sentences are interchangeable in this context.