A vegetable cart sells a potato for $0.24 and a tomato for $0.76. Fred bought 12 vegetables in total. he only bought potatoes and tomatoes. If Fred paid $6.52 total, how many potatoes did he buy?