A bag contains red, blue and purple marbles, and does not contain any other marbles. The ratio of the number of red marbles to the number of blue marbles is $4: 7$. The ratio of the number of blue marbles to the number of purple marbles is $2: 3$. There are 32 red marbles in the bag. In total, how many marbles are there in the bag?
(A) 162
(B) 129
(C) 176
(D) 164
(E) 172
Since there are 32 red marbles in the bag and the ratio of red marbles to blue marbles is $4: 7$, then there are $\frac{7}{4}(32)=56$ blue marbles in the bag.

Since there are 56 blue marbles in the bag and the ratio of blue marbles to purple marbles is $2: 3$, then there are $\frac{3}{2}(56)=84$ purple marbles in the bag.

Since the bag contains only red, blue and purple marbles, then there are $32+56+84=172$ marbles in the bag.

ANSWER: (E)