Yep (and if Castillo is put back on the 40 man, his $ count going forward as well). I asked the other day, but I think the only way Pedroia's contract won't count is if he voluntarily walks away (ala Dempster). If he's forced to retire due to injury, it counts.
Other than another team picking up the entire contract (and why would they), his salary is on the books no matter what.