In a (not a musical) movie I watched recently, the cast did a song & dance bit, and one of the characters broke the fourth wall and told the audience, “I love a musical number.”
In fact, I’ve heard these bits referred to a “numbers” for as long as I can remember. But why number specifically?
My guess, and it’s only a guess, is that for centuries Western music was catalogued by number. For example, this bit, colloquially known as “Sonata Facile,” is actually Piano Sonata No. 16 in C Major, K.545.
I don’t think it’s more complicated than the order of the songs in the musical/opera.
A number opera (Italian: opera a numeri; German: Nummeroper; French: opéra à numéros) is an opera consisting of individual pieces of music (‘numbers’) which can be easily extracted from the larger work.[1] They may be numbered consecutively in the score, and may be interspersed with recitative or spoken dialogue.
There’s also a general page for “numbers”, but it’s oddly unhelpful here.
A number is not necessarily a song, a number is any part in a public representation of something, like in a theatre or a circus. Here is for instance the Spanish definition of the word number. The sixth meaning reads:
m. Cada una de las partes o actuaciones de que se compone el programa de un espectáculo público. En el circo vimos un número de magia.
Which I translate as:
m. Each of the parts or performances of which the program of a public show is composed. In the circus we saw a magic number.
It is the same in German (see aception 2.a) (link in German): “individual performance of a circus, cabaret or varieté program”. I would guess by gut feeling that the origin of the use of the word number in this sense is French.
Note that in the example you gave the expression is “I love a musical number”, it has to be specified that the number is musical, just saying “I love a number” does not make it a song.
The question is “Why is number is a synonym for song?” I heard a theory many years ago. I just did some research but couldn’t find support. Here it is anyway.
Ships on The White Star Line had a list of 341 songs which the orchestra could perform.
The theory says that when a passenger wanted to request a song, they would write the NUMBER, not the title, on a slip of paper and hand it to the leader. When the leader introduced the song, he would say, “This next number….”
It’s as good an explanation as any other until someone finds something better.
Like I said, I couldn’t find anything to support that explanation. I should have added the disclaimer on astrology columns in newspapers: presented for entertainment purposes only.