count_patients_recursive function

Count patients recursively