A baker makes two types of cookies: chocolate chip and oatmeal. The baker sells chocolate chip cookies for $1.50 each and oatmeal cookies for $1.25 each.
If the baker sells a total of 40 cookies and earns $54 from the sales, how many chocolate chip cookies did the baker sell?