A head to head comparison of the 2008 Maryland General Election gives us an idea of the break down of the voters.    

Barack Obama received 1,629,467 (62%) votes, beating John McCain who gained 959,862 (37%) by 669,605 votes in Maryland.

John McCain won 17 counties whereas Barack Obama won 7 counties in the total of the 24 counties in the State of Maryland.

Presidential General Elections

During the 2008 General elections, over 131M total number of votes were cast. Barack Obama got 69,448,278 (69.4 Million) over John McCain's 61,739,059 (61.7 Million). He won the popular vote by 7,709,219 (7.7 Million). His victory in the State of Maryland (with 1,629,467 votes) represents 2.3% of his popular vote victory. The remaining 49 states contributed to the remaining 97.7% popular votes victory.

Top 15 Counties in Primary Elections vs General Elections

All Candidates (General Elections)

These 15 counties play an important role in these Primary elections. If a candidate, can get a sizable majority in the largest counties (Montgomery, Baltimore, Prince George's, Anne Arundel, Baltimore City), it becomes very difficult to win majorities in the smaller counties without voter outreach and increased voter participation in them.

Top 15 Counties Comparison in Primary Elections vs General Elections

General Elections
Barack Obama

General Elections
John McCain

Montgomery, Baltimore, Prince George's and Baltimore City, four of the larger counties, voted in favor of Barack Obama giving him a 731k vote advantage. Anne Arundel and Harford, another larger counties, voted in favor of John McCain giving him a 27k vote advantage. However, John McCain's steady marginal wins in the less popular counties were enough to overcome that deficit, making Barack Obama gain an upper hand in the State of Maryland.

Related References: 2016 Maryland Primary Election Story, 2016 Maryland General Election Story, 2020 Maryland Primary Election Story, 2020 Maryland General Election Story, 2012 Maryland General Election Story