I think viilain has two meaning,good bad guy and bad bad guy?
I don't count "good bad guys" as villains, in the sense of Duke in eg Stagecoach, Angel and Badman and Three godfathers is an outlaw, but he's still the "good guy". Much more so, than Duvall's sympathic, but neverthless bad guy in True grit. Duke's characters in eg The Searchers, Red River or Wake of the Red Witch are not good or bad, they're troubled and confused.
I counted one "bad good guy" as a villain, Gene Hackman's sheriff in Unforgiven, there are not many film characters I'd hate more