Translation:How many villages are there next to the city?
In itself the sentence "hoeveel dorpen zijn er" is correct. However, when you add the clause 'naast de stad' the meaning shifts from existential 'to be' to the 'to be' that signifies placement of something in relation to another thing. At that point, Dutch switches to 'liggen'.
Ok, thanks. I wasn't actually comparing it to English usage but to my native German :) In German you would also normally say "Die Dörfer liegen bei der Stadt" but it's not wrong to say "Die Dörfer sind bei der Stadt". It's not really a problem with this particular sentence but it costs me some effort to write "Hoeveel appels zitten er in de doos?" because you wouldn't use the verb "sitzen" in that situation in German. So, this is another trap for native Germans I have to conciously work against :) Thanks!
It's slightly confusing that they are using "naast" because that indicates a location on one side of the city. "Hoeveel dorpen liggen er rondom de stad" would make more sense to me.
If you ask "hoeveel dorpen zijn er naast de stad", the meaning could also be "how many villages are there not including the city". But otherwise, "zijn er" isn't too bad. Duolingo is probably just strict in teaching verbs like "liggen" and "staan" for locations.
A good sentence is: Hoeveel straten zijn er in de stad.
"naast de stad" is not a good expression in this context. "Naast" suggests that all the villages are in the same direction.
A better sentence is: Hoeveel dorpen zijn er / liggen er omheen /rond de stad.
In this sentence are both correct: zij/liggen.
It is not absolutely wrong, it is actually perfect dutch, but the meaning is slightly different. It is about the meaning of ".. naast de stad." "Naast" can be a location, ("Neben" auf Deutch) but it can also mean something like "next", "additional", "beside" ("auch" auf Deutch). We could ask "hoeveel dorpen zijn er naast de stad in de het bundesland Hamburg. Then it is not exactly about all the villages that are within a limit of 10 KM from the city center, but all the villages that are in the whole Bundesland. In german that would probably be: "wieviele Dörfer gibt es neben Hamburg in.."