Actually the movies were made directly from the book (with a few minor variations) and if you read the book, at the begining if you read the Note On The Text it will read:
"The Lord of the Rings is often erroneously called a trilogy, when it is in fact a single novel, consisting of six books plus appendices, sometimes published in three volumes."
"The Lord of the Rings is often erroneously called a trilogy, when it is in fact a single novel, consisting of six books plus appendices, sometimes published in three volumes."




Comment