He had 40-odd. Inherited from his father-in-law. Regardless, Lee didn't have any real problems with the institution to begin with.
Robert E. Lee did not own slaves, but many Union generals did. When his father-in-law died, Lee took over the management of the plantation his wife had inherited and immediately began freeing the slaves. By the time Lincoln issued the Emancipation Proclamation in 1863, every slave in Lees charge had been freed. I already mentioned he freed the slaves he inherited from his father. He lived in a time when slavery was legal and had not control over what either father did. He did have control over what he did and did not retain the slaves willed to him. Notably, some Union generals didnt free their slaves until the ratification of the Fourteenth Amendment in 1868.
You are intent on destroying a man that leaders on both sides of the Potomac had great respect and admiration for. He was a decent man. Lee vigorously opposed slavery and as early as 1856 made this statement: “There are few, I believe, in this enlightened age, who will not acknowledge that slavery as an institution is a moral and political evil.”