Axolottie is correct; as adults there should be absolutely no more than 4 in a 40 gallon. If you plan on upgrading again in the relatively near future, you could probably do five or six juveniles; it really depends on their size. I personally don't put more than 2 in a 40, but I also have about two dozen tanks ready to roll at any given time. Just like any creature, the more room axolotl have to move around, the happier they're going to be. More room to hide, and space they can make their own is important. As an example, I've got a 115 gallon tank in my living room, and that's where I keep my personal pet axolotls, Calliope and Cassiopeia. They seem to be significantly happier than their brothers and sisters in the 40s.
Personally, I would recommend getting more tanks if getting more axolotls. They aren't too expensive if you pay attention to garage sales and facebook buy/sell/trade groups. Most of my 40s with full setup and cabinets were less than 50 apiece. Some were free.