In a geometric progression, the sum of the first and last term is 66. The product of the second and second last term is 128. The sum of all the terms is 126. How many terms are there in the progression?