Civil War Regiment Numbering

What do the number of the Civil War regiments signify? For example, the 84th New York - what does the 84 stand for? the 84th regiment raised on the Union Side? The 84th regiment raised in New York? Their first commanding officer liked the number 84?