Shares of The New York Times Co. climbed the most in nearly two years after Mexican billionaire Carlos Slim boosted his stake in the company. The stock has dropped 31 percent this year. Inmobiliaria Carso SA, Slim’s investment vehicle, increased its holdings by 850,000 shares to 11.9 million shares, according to documents filed with the Securities and Exchange Commission. The purchases boosted the stake in Times Co. Class A shares to 8.1 percent. “The New York Times is a great media company, with a great name, excellent content, and very good management,’’ said Arturo Elias, Slim’s spokesman. The Times Co. owns The Boston Globe, the Worcester Telegram & Gazette, and other media properties.