Fix for MessageBag::count()
Merge pull request #3870 from nabil1337/4.1

Fix for MessageBag::count()