If each bag has 45 cookies and you had 45 cookies in total How many bags of cookies do you have?
There are 45 cookies in each bag. 
You have 45 cookies in total. 

That means that you have 1 bag of cookies.