You are talking about software estimation.
The seminal, canonical references on software estimation are Barry Boehm's "Software Engineering Economics" and Tom DeMarco's "Controlling Software Projects".
Boehm's book is where you start, even if it is 35 years old. His biggest contributions are (1) the recognition that the estimating equation is inherently nonlinear, (2) the use of actual data over a significant number of projects to calibrate an estimating methodology, and (3) the recognition that certain factors like tools, team capability, and schedule compression or expansion will change the estimated effort. (Compress the schedule and total number of man-hours goes up. Expand the schedule and total man-hours goes UP.)
Step 1 is to estimate effort, in something like man-hours or man-days. Step 2 is to turn the man-hour estimate into a nominal estimated schedule, usually in days, weeks, or months, and a nominal team size. Step 3 is to revise the man-hour estimate, using the actual schedule dictated by what some have called the high-rafter bats (aka upper management, or maybe Sales or Marketing).
DeMarco's biggest contribution is the idea of an "impossible region": Some schedules are simply impossible to meet, no matter how many bodies you throw at them, no matter how good they are.
Shortly after Boehm's book came out, General Dynamics Fort Worth Division adopted his methodology, and calibrated their own estimator to their own actual data for F-16 software development. They then proceeded to bet the company's bottom line every time they estimated an F-16 software modification task.
My first experience with COCOMO was while I was there: I was more than a little surprised when, on an internal project, I discovered that Boehm's "punch in the numbers and turn the crank" methodology yielded an estimate that agreed quite closely with my personal gut feeling.
I find it more than a little dismaying when I see people using linear estimators ("10 lines per man per day", or some such) EVEN TODAY, 35 years after Boehm's book was published.
Once you have taken a pass through Boehm's book, you can look at the update: "Software Cost Estimation with COCOMO II". The original COCOMO, from 1981 or so, did not scale to "more modern" (translate: many times larger) projects.
After you have digested the above three books, THEN you can look at Steve McConnell's "Software Estimation: Demystifying the Black Art". DON'T try to skip straight to McConnell's book.