The number of Americans who applied for unemployment benefits last week rose to 248,000, putting them close to a two-year high.