5 layers causes 5 separate draw calls. Draw calls are (usually) the (most) expensive part so reducing the amount is often the focus in optimising drawing efficiency.
That said, 5 is very few and there should be no significant difference in the speed of drawing 50,000 triangles with one call and drawing 10,000 triangles 5 times.
However, draw calls add up and increasing that layer to 500 (as you suggested) would result in a number of draw calls that can severely "lag" some systems. For so many layers, you can combine them into fewer calls and draw the later layer's triangles towards the end of the call to be draw over the top.
It's simpler and easier to draw the layers separated but too many layers can cause unacceptable frame drops so if many layers are needed, combine them when drawing.
Are you really considering draw 500 layers of 10,000 triangles? 5 million triangles is a lot, especially for 2D work since a full HD display is only displaying just over 2 million pixels.