The entire electoral college does not meet together in one place. Electors meet in their respective state capitals (electors for the District of Columbia meet within the District) on the Monday after the second Wednesday in December, at which time they cast their electoral votes on separate ballots for president and vice-president. Each state then forwards the election results to the President of the U.S. Senate, the Archivist of the United States, the state's Secretary of State, and the chief judge of the United States district court where those electors met. A joint session of Congress takes place on January 6 in the calendar year immediately following the meetings of the presidential electors. The electoral votes are officially tabulated at the joint session of Congress and the winner of the election is officially declared.
Since the election of 1824, most states have appointed their electors on a winner-take-all basis, based on the statewide popular vote on Election Day. Maine and Nebraska are the only two current exceptions, as both states use the congressional district method. Maine and Nebraska use the "congressional district method", selecting one elector within each congressional district by popular vote and awarding two electors by a statewide popular vote.
There actually isn't a constitutional basis. Article 1 Section 2 references electors but makes no provision for the electoral college.
It cast 31 electoral votes for Obama.
Pennsylvania casts its electoral votes in the U.S. Electoral College on a winner-take-all basis. The winner of the popular election in Pennsylvania gets all of Pennsylvania's electoral votes.
No city in Pennsylvania gets electoral votes. Based on the 2010 Census, Pennsylvania has 20 electoral votes. Pennsylvania casts all of its electoral votes in the U.S. Electoral College on a winner-take-all basis. The winner of the popular election in Pennsylvania gets all of Pennsylvania's electoral votes.
Texas casts its electoral votes in the U.S. Electoral College on a winner-take-all basis. The winner of the presidential election on Election Day in Texas gets all of Texas' electoral votes.
Illinois was allowed to cast 21 electoral votes in 2008.
counting the electoral votes that were cast in the presidential election
Virginia had 13 electoral votes in 2004, which they cast for George W. Bush (R).
The person who gets a simple majority of the votes takes all the electoral votes for that state. Electoral votes are not distributed on the basis of what percentage each candidate received. If you receive 50.6 you take them all
Virginia cast 13 electoral votes in 2008. These went to Barack Obama (D) who received 1,959,532 votes to John McCain's (R) 1,725,005 votes.
Virginia had 12 electoral votes in 1984, which they cast for Ronald Reagan (R)
Wisconsin had 10 electoral votes in 2004; they were cast for John Kerry (D).
Indiana cast its 11 electoral votes for Donald Trump in the 2016 election.