TL;DR Tolkien himself did NOT consider it a trilogy.
It shouldn't even be called 3 books, since Tolkien didn't refer to them as books, but as volumes, and any time he used the word he air-quoted it as 'books'.
Wikipedia gives us a good start:
Tolkien regarded it as a single work and divided it into a prologue, six books, and five appendices. Because of post-World War II paper shortages, it was originally published in three volumes.
To back that up, we can refer to Tolkien's letters:
P.S. I have given some thought to the matter of sub-titles for the volumes, which you thought were desirable. But I do not find it easy, as the 'books', though they must be grouped in pairs, are not really paired; and the middle pair (III/IV) are not really related.
Would it not do if the 'book-titles' were used: e.g. The Lord of the Rings: Vol. I The Ring Sets out and The Ring Goes South; Vol. II The Treason of Isengard, and The Ring goes East; Vol. III The War of the Ring, and The End of the Third Age'?
If not, I can at the moment think of nothing better than : I The Shadow Grows II The Ring in the Shadow III The War of the Ring or The Return of the King. JRRT.
The (unavoidable) disadvantage of issuing in three pans has been shown in the 'shapelessness' that several readers have found, since that is true if one volume is supposed to stand alone. 'Trilogy', which is not really accurate, is partly to blame. There is too much 'hobbitry' in Vol. I taken by itself; and several critics have obviously not got far beyond Chapter I.
And the most direct one:
P.S. The book is not of course a 'trilogy'. That and the titles of the volumes was a fudge thought necessary for publication, owing to length and cost. There is no real division into 3, nor is any one pan intelligible alone. The story was conceived and written as a whole and the only natural divisions are the 'books' I-VI (which originally had titles).
Further details can be found in this excellent article from The Tolkien Society: "The Lord of the Rings: The Tale of a Text":
The Lord of the Rings is not a trilogy: by the time it was being prepared for publication in 1950, Tolkien was thinking of it as a duology: a book of two parts, the other being The Silmarillion - a work concieved of as being of equal size to The Lord of the Rings (Letter 126 to Milton Waldon, 10/3/1950).
... Tolkien's publisher, Stanley Unwin, was not convinced by the idea of publishing The Silmarillion, and wanted to publish just The Lord of the Rings. In 1952 the publishers estimated the price for a single volume would be at least £3 10s, and were looking into the possibility of publishing the work in two volumes, as well as for a cheaper printer. As we know, Allen and Unwin decided that three volumes was the best number: an economic, not a literary decision: Tolkien at this point was still thinking of his work as six books (Letter 136 to Stanley Unwin, 24/3/1953)