Yes, as long as the pension income is reported on your federal return, it should qualify for the Maryland Pension Exclusion.
Keep in mind, the maximum allowable pension exclusion of $36,200 per taxpayer on your Maryland return includes the full amount of your social security benefits.