Many times throughout the episode, the "real" Doctor and the flesh Doctor hand the sonic screwdriver to each other. However, even though there is only one sonic screwdriver, at points they both are seen using one.
At the end when the Doctor opens up the screwdriver to disconnect Amy we cut to a view from his standing point and the screwdriver is still closed.