How many soldiers served on both sides during the US Civil War?

Nearly three million soldiers served in the US Civil War.