A packet of sweets contains only yellow and purple sweets. The ratio of yellow to purple sweets in the packet is 2:1. If there are 9 sweets in total, how many purple sweets are there?​