"There are as many girls in the room as boys."
Translation:Annyi lány van a szobában, ahány fiú.
The Hungarian sentence sounds perfectly fine. Not sure about the English one though. :) The two sentences are basically the same, it is just what you say first. It slightly changes the reference. For example: "My height is the same as yours" vs "However tall you are, I am the same height". Or "Whatever your height is, my height is the same".
I guess your English sentence is doing the same, right?
Wrong focus. By placing szobában in front of van, you're focussing on the room instead of the number of girls, so the listener would expect you to go on with a different location:
Annyi lány a szobában van, ahány a konyhában. - There are as many girls in the room as there are in the kitchen.
It's always a question of focus. He you're comparing two numbers, so the phrase containing annyi needs to directly precede van.
Are you referring to this previous exercise? (It's the only one I remember containing both nincs and annyi.) The focus is here on the nonexistence of trees, or rather that there are not as many trees in the garden as there are in the forest. You can place nincs basically anywhere there, but negations usually sound better when they are in the front.