The Shulchan Aruch states that though a person may be a notorious and habitual sinner and has even committed a capital offense unless a person has been placed under a religious ban due to his sinful behavior, he is counted among the ten.