Translation:How many hours do they work?
Nan ji 何時 = At what time?
Nan ji kan 何時間 = How many hours? (although you could interpret that as how much time? also as you mentioned).
It's not "how many times."
何を買いますか (nani o kaimasu ka)
What will you buy?
It's a little more complicated to ask "how many will you buy", because the questions changes according to what's being bought. 何 combines with the counter.
本を何冊買いますか (hon o nansatsu kaimasu ka)
How many books will you buy?
何個買いますか (nanko kaimasu ka)
How many small objects will you buy?
The "type what you hear" questions are automatically generated from the lesson sentences. In most languages, there's only one way to type what you hear, so even if the exercise is automatically generated, there should only be one correct answer. Unfortunately with Japanese, there are multiple correct ways to type the same thing, but only the top answer can be accepted. Most users recommend to other users to use the word bank for those questions or skip them entirely until Duolingo can come up with some kind of fix for the problem.