Again at eight o’clock, when the dark lanes of the Forties were lined five deep with throbbing taxi-cabs, bound for the theratre district, I felt a sinking in my heart.
(F. Scott Fitzgerald, The Great Gatsby)
What’s the meaning of ‘five deep’?
It means there were 5 taxis next to each other like |||||. If it was 5 long it would mean they were in a line like -----.
The meaning will vary depending on context. While the quotation implies a perspective looking across the road, it doesn't literally need to be so.
If you wrote:
The detective was trying to get through the crowd that was now five deep with angry onlookers.
Here it's front to back (from the perspective of the detective), not side by side.
So from the perspective of the speaker it would be five (somethings) in his line of sight.
As others have said, the expression provides a quantitative description of the width of something, and it's often used when people (or something else, like taxis) are crowded together.
For example in the image on the left, it's hard to get a precise count, but it looks like you could say, "The crowd was packed at least nine deep along the parade route." In the image on the right, though, it looks like the crowd is "two deep" – if that much – but the "n-deep" expression isn't used very much when talking about crowds that are sparse, where there is plenty of open space to mingle around.