10 episodes. And yea, the rest of the book will be season 4 with, i imagine a bit of "a feast for crows" thrown in towars the end. The way the books are written there is some overlapping.
They did it quite well, I think. I'm not sure if the show foreshadowed this moment a lot more than the books, or if I saw it more easily because I've read the books.