Answer: 4
The ratio in which the chocolates are divided into types can be seen as splitting the chocolates into 1+2+2 = 5 equal parts. Since there are 20 chocolates, each part corresponds to 20/5 = 4 chocolates. Thus, there are 1*4=4 chocolates with nuts, 2*4=8 plain chocolates, and 2*4=8 chocolates with caramel. Now, the three boys are dividing the chocolates into 3+1+1 = 5 equal parts. Thus, each part again corresponds to 4 chocolates. So, Andy will receive 3*4=12 chocolates, Bert will receive 1*4=4 chocolates, and Charles will receive 1*4=4 chocolates. Because neither Andy nor Charles can eat nuts, and there are four chocolates with nuts, and Bert receives four chocolates, Bert must take all of the chocolates with nuts. Charles receives four chocolates total, and, since he prefers caramel, he will take four of the eight caramels. This leaves eight plain chocolates and four caramels to make up Andy's twelve chocolates. Thus, Andy receives 4 pieces of chocolate with caramel.