The numbers are the ones I've always seen, actual size might have been different. 30,000 refers to the size before Antietam (~42,000) minus the battle casualties taken (~11,000-12,000).
Okay, so Lee crossed into Maryland with about 69,000 men in the first week of September 1862. The army left 5,000 men behind at the Potomac, as they were physically unfit for the offensive or lacked shoes. In the various battles in Maryland before Antietam, the army lost about 3,000 men, which with the sick left at Frederick Maryland, should have left a balance of about 63,000 men for Antietam. Of course, when Lee made his stand at Sharpsburg, he only had about 38-40,000 men to go around. This leaves about 25-27,000 men straggling, deserting, or sick outside the campaign's battle losses.
It is remarkable that Lee was about to rebuild his army so quickly after the Maryland campaign. Replacement manpower came from a few different sources. As alluded to above, there were plenty of stragglers to go around; J.R. Jones combed the Shenandoah Valley for them, and brought about 5-6,000 men into the camps, and Confederate Secretary of War Randoplh boasted that the army had swelled by 20,000 men in eight days. Wounded men returned to the army in good numbers. About a third of the Army of Northern Virginia's cumulative manpower enlisted in 1862 under the Conscription Act (which Lee's staff helped write).
I didn't see this explicitly mentioned anywhere, but I think it's also worth remembering that prisoner exchanges were still operative in Fall 1862. Though it's usually overshadowed by the showdown at Sharpsburg, during the Maryland campaign, Lee had overseen the largest surrender of U.S. troops until the fall of the Philippines during WWII, when Harpers Ferry was captured, yielding a prisoner haul of ~11,000. Lee did a superb job scraping together stragglers, convalescents, conscripts, and exchanged prisoners to rebuild the army that would triumph at Fredericksburg.
Check out General Lee's Army: From Victory to Collapse by Joe Glatthaar, the relevant chapters of Freeman's biography, and To Antietam Creek by D. Scott Hartwig.
It is worth noting that Union estimates of Confederate troop strengths were skewed during the early part of the war as Union generals wanted more funding from congress.
I'll look for a reference but Pinkerton reported estimated troop strengths and then the brass modified the numbers to reflect a need for more troops and weapons. IIRC, they overestimated confederate numbers by 2-3x so they would get enough resources to guarantee victory.
Edit: A famous misstep came during 1862’s Peninsula Campaign, when Pinkerton reported that the Confederate forces around Richmond were more than twice their actual size. McClellan believed the faulty intel, and despite outnumbering the rebels by a large margin, he delayed his advance and made repeated calls for reinforcements.