The Corp must decide how many cards they will draw (any number from 0 to X), then draw that many cards. They cannot see the cards as they draw them, then use this information to decide when to stop drawing. The same is true for the installs; first the Corp decides how many cards they will install, then they install that many cards one at a time.