My wife asked me out of the blue where the phrase do a number on ‘have a bad effect on’ (“That really did a number on me”) came from; I had no idea, and it seems the OED doesn’t either:
U.S. colloq. (orig. in African-American usage). to do a number (occas. to lay a number): to act with destructive force or impact; to criticize or humiliate; (hence) to have a strong, usually adverse effect. Freq. with on.
1967 H. LIT Unbelievable Dict. Hip Words 12 Do a number, to get mad; make a scene; to tell somebody off; blow your cool. … 1991 N. BAKER U & I vii. 119 When Ada finally did arrive, Updike did such a number on it in his review that he felt compelled to explain.. that he writes faster than he reads. 2002 Star Tribune (Minneapolis) (Electronic ed.) 6 Dec., Navigating bumpy dirt tracks and completing hairpin turns often does a number on shocks, tires, belts and other parts.
Looking around, I discovered another interesting idiom, this one thoroughly obsolete: to lose the number of one’s mess ‘to die, to be killed’ (1807 in A. Paget Paget Papers II. 314 If we are going against Copenhagen many of us will lose the number of our mess). Idioms: can’t live without ‘em, can’t explain ‘em.