Factors influencing the number and treatment of slaves