There are seven - the confusion arises from the fact that the seventh book, Harry Potter and The Deathly Hallows, was adapted into two movies.