Function to count free people