Check if the method deprecatedFeaturesCount exists before calling it
Check if there is something in the output buffer before deleting it
Merge pull request #1 from EricHogue/fixCallToDeprecatedMethod

Fix call to deprecated method