Depends on what kind of paint and how many coats you are doing. Are you going 'showroom shine' or 'just get some color in there'?
I'm going to assume, for purposes of an answer, that if you're painting it with a spray can that 'showroom shine' isn't the goal. With that in mind there's not a lot of metal in the bay. I'd say if you've prepped everything properly (2) 12oz cans of each should be plenty for 2 coats sandable primer, 4 coats color, 1-2 clear. I'm basing this off the amount I used when I resprayed my entire car with Rustoleum Premium Automotive paints. Paint goes a long way if you lay it down lightly and evenly. You won't win any 'Best Engine Bay' awards but it can look really decent with proper prep and spray technique.
Post pics when you're done!