AFAIK numbers and counters are usually used in four ways which are following:
-X, number, counter (아이 두 명)
-num, cntr의, X (두 명의 아이)
-num, X (두 이아)
-X, num (아이 둘) (notice the 둘 instead of 두)
They can be used rather interchangeably, however, the first one seems to be more popular than the rest. Also the second one is supposedly used mainly in writing.
In North Korean orthography, there is no space in front of the counter. Therefore: 아이 두명 and 두명의 아이.
What Duolingo (and most materials designed for beginners, for that matter) calls prepositions are actually nouns. For example, think of 아이의 옆 as "in front OF the children." The logic works for all Korean "prepositions," though it doesn't really hold for English. Does that make sense to you?
In another question that features "between" the sentence is "장난감이 의자하고 책상 사이에 있어요".
Is there a reason why there is no "의" after "책상" as there is after "아이" here? Would both sentences be correct with or without the "의" or is there a reason why it's omitted in one case and not in the other?