To some extent, the answer to this question depends on what you count as participation. According to Wikipedia's article on the 2008 Summer Olympics, "all but one (Brunei) of the 205 National Olympic Committees (NOCs) participated". So, in answer to your question, 204 countries participated by sending competing athletes.
The 205th country, Brunei, was disqualified for failing to register their athletes. The Wikipedia article also lists the number of competitors per delegation from the participating NOCs. The three countries participating for the first time were the Marshall Islands, Montenegro and Tuvalu. The article also notes that "a record 87 countries won a medal", "more than "100 sovereigns, heads of state and heads of government" attended the games."