Madison is one of the 56 counties in the state of Montana. It was created in 1864, making it one of the original counties of the state. As of the 2010 census, the population was 7,691. The county seat is Virginia City. The county has 3,603 square miles of area.