Maria is organizing a small fundraiser. She is selling cookies for $3 each and brownies for $4 each. If she sells a total of 15 items and earns $45, how many cookies did she sell?