As of my last update in January 2022, there are four main Shrek movies:
1. Shrek (2001)
2. Shrek 2 (2004)
3. Shrek the Third (2007)
4. Shrek Forever After (2010)
Additionally, there are spin-off movies and specials, such as "Puss in Boots" (2011) and various short films and holiday specials featuring characters from the Shrek universe.