A cookie factory uses 1/4 of a bag of flour in each batch of cookies. The factory used 3 bags of flour yesterday. How many batches of cookies did the factory make?