Why are women's outfits sometimes called "numbers"?

As in “her dress was a dark blue number”…

Example:

This article about shopping for lingerie online contains the following quotes:
http://articles.directorym.net/Online_Lingerie_Shops_Offer_Convenience_at_Great_Prices-a942238.html

“They also offer more than just lingerie, such as a long black number with deep halter neck and cut-out side”

and

“perhaps a red halter deep-cut number that will leave your partner gasping”

What is the deal with calling items of clothing “numbers”?

This doesn’t answer the OP but “number” has lots of other uses too:

“the doctor sure did a number on me”
“that hot number standing at the bar”
“that bullet had his number on it”
“for my next number, I’m going to play…”

one singled out from a group:

Number as a slang expression for clothing, especially women’s clothing, is found in speech from the last decade of the 19th century. Curiously, the word is also used about that time to indicate an attractive member of the opposite sex–“hot little number.” Also, around the same time, it was used in the theater to indicate a certain routine.

Just musing here…