It's going to be a while before they entirely stop recording, in my opinion.
However, I would take a guess and say that there will be one more fully toured album after HTDAAB. That will take them right to 50, and give them enough material for a Best Of 2000-2010. After that, I would expect them to record as they feel like it, but maybe just release EPs every so often. I just think they love what they do way too much to pull the plug all at once. They'll slow down, but I can't imagine them fully stopping any time soon.
Seriously though, no offense to the poster, but I'm tired of seeing these threads. U2 are in incredible form right now, and HTDAAB isn't even in stores yet! We have a huge upcoming tour, tons of promo events, and awards shows to look forward to. If we keep thinking about their demise, we'll never be able to enjoy all of this. Yeah, the end will come at some point, but it's damn sure not here at the moment.