It depends obviously on the number of doors and how many coats of primer and paints you're spraying. If your cabinet frames have crown molding and lots of paneling, that will consume more primer and paint. Most of the cabinet jobs I do are similar in size, so I just know how much material it's going to take. I spray two coats each of primer and paint on everything. With that in mind, a kitchen with 30 to 40 cabinet doors usually takes 4 to 5 gallons of paint for the doors alone and another 2 to 3 gallons of paint for the frames. Factor in roughly the same amount of primer. Spraying consumes more material than brushing and rolling. You can return unopened primer if it's untinted. With the paint, when I'm unsure of exact amounts I'll need, sometimes what I'll do is have the store leave a gallon or two untinted so I can return them if needed, or I'll use them for my next project.