How many total airframe cycles should a B737-400 be put through before it becomes too costly to maintain?
According to this chart from the FAA the B737-400 variant was designed for 75,000 cycles. You can find more general info in this question as well as this discussion and this one. However there are lots of other factors that may make a 737 too costly to maintain long before it reaches the cycle life time. 

Just to give an idea of flight cycles to time comparisons. Lets say a 737 flys an average of a 2 hour flight and 30 minutes to turn the plane around. 75,000 * 2.5 = 187,500. There are 8760 hours in a year so if the plane were to fly continuous 2 hour legs with 30 minutes to turn the plane around it would take 21.4 years to hit the 75,000 cycle life of the fuselage. However we all know that planes need service and most airlines dont have 100% airframe utilization all the time so it will take well over 21.4 years to hit that cycle limit.