Depends on the region and if you include special editions variants and homebrews.
They're still releasing PS2 games. FIFA 2014 just came out in September.
On playstation.com it lists a total 1791 games, but that's just listing the total for my region (USA). I've seen a lot of people say more than 2400. Other sources point to 3800 and more!
Wiki: 967 games for the Xbox video game console. Includes 284 titles exclusive to North America, 58 exclusive to Europe, 24 exclusive to Japan, and three exclusive to Australasia.
GameCube 554
Dreamcast 248