Estimating finite-population reproductive numbers in heterogeneous populations