A grocery manager sells 2 bags of potatoes for each bag of carrots. He also sells 6 bags of onions for each bag of potatoes. If he sells 12 bags of onions, how many bags of carrots will he sell