Ubisoft originally announced plans for a trilogy, intending to wrap up the main story with Assassin's Creed 3. That count doesn't include the various spin-offs, such as Assassin's Creed: Bloodlines.
References:
https://ps3.ign.com/articles/105/1052557p1.html
https://www.videogamesblogger.com/2009/06/10/assassins-creed-3-will-see-desmond-become-the-ultimate-assassin.htm