Well they left it open for a (at the time) fourth film after Return Of The Jedi, when the ghosts of Ben, Yoda and Anakin said 'there is another', meaning Princess Leia. The whole thing was based on The Adventures of Luke Skywalker series of novels written by Lucas as far as I remember...can't remember how many books there were now though. The disasters that were the last (first) three films wouldn't be included due to Luke Skywalker not being in them.
Being a Star Wars fan from day one (being old enough to have seen it at the Cinema first time round), the Star Wars series was originally intended to be 9 films. That is what George Lucas originally stated.
The first trilogy were parts 4, 5 and 6. The second trilogy parts 1, 2 and 3 though they screwed up a bit because they couldn't fit the clone wars in, though that was then going to be a live action TV series scheduled for something like 98 or 120 parts if I recall. They were then going to make the final trilogy (parts 7,8 and 9).
The books co-incided with the films rather than the films being based on the books because it was always Lucas' intention to make films and the books have the script pretty much intact in them.
The first book published was Star Wars: From the Adventures of Luke Skywalker in 1976. It has had it's title revamped a bit since then (I think it has also had the "A New Hope" added to it). It was 190 pages and contained a few glossy photo pages in the middle which were stills from the film, with production notes. The notes for the first photo, a still of Luke in his speeder, states that it was "written and developed for the large screen".
It's copyright 1976 by the Star Wars Corporation and frist printed in the UK by Sphere Books in 1977 (I've just dug the book out and looked). It is credited to George Lucas but apparently was also ghost written by Alan Dean Foster as Lucas' input was the script element. Foster did the descriptive parts, it's why the book is so close to the film.
A lot of spin off books were written using the characters and universe, but were not intended to be part of the 9 part film saga. There were a few about Han Solo and his adventures before becoming involved with the rebel alliance. A few set between and around events in the original trilogy. My favourite of them was "Splinter of the Mind's Eye" (written by Alan Dean Foster who was involved with the originals so it's probably why it's one of the best).
I have not read any of the newer books (beyond the early 80's) and there have been a lot of them.