In President Obama’s speech earlier this week in Kansas, he mentioned the words “middle class” an astounding 18 times. (Yes, we counted.) That was, um, not accidental.

A look back at the last four elections — two presidential, two midterm — reveals that middle class voters are a critical swing voting bloc that serve as a key indicator of which party will make gains at the ballot box.

The chart below — thank you Google Docs! — details the percentage of the vote the two parties have won among voters whose household income is somewhere between $30,000 and $100,000 (our working, if broad, definition of “middle class”) in the last four national elections.

Since 2004, neither party has received less than 46 percent or more than 53 percent of the middle class vote, evidence of the middle class as a barometer of the divided nature of the country as a whole.

Not only are middle class voters up for grabs, they have also been a majority of all voters in the country over the past four elections.

In 2010, voters making between $30,000 and $100,000 accounted for 55 percent of the overall electorate while in 2008 they comprised 56 percent. In 2006 (58 percent) and 2004 (59 percent) they were an even larger percentage of the overall electorate.

Given the size of the middle class vote , it makes sense that how they vote mirrors how the country votes. In 2004 and 2010, Republicans carried the middle class and scored across-the-board victories. In 2006 and 2008, Democrats’ wins among middle class voters presaged their sweeping victories at the White House, Senate and House levels.

More recent polling suggests that the middle class is once again a major political jump ball heading into 2012.

In a November Washington Post-ABC News poll, 45 percent of respondents said they trusted President Obama to protect the middle class while 41 percent said they trusted congressional Republicans.

That amounts to major erosion on the question for Obama who led 53 percent to 38 percent over congressional Republicans on it as recently as December 2010.

But, Obama still holds a steady-ish lead when people are asked who “cares” more about the middle class. In an October Post-ABC survey 52 percent said Obama cared more about the middle class while 32 percent said congressional Republicans did. (Seven in ten respondents in that same poll said Republicans cared more about the wealthy than did President Obama.)

Those poll numbers explain why Obama centered his Kansas speech — an address that laid out the terms of the economic argument he will make to voters in 2012 — was so focused on protecting and preserving the middle class. How the middle class goes will determine in large part how the 2012 election goes.

Peyton Craighill and Scott Clement contributed to this report.