refactored inbox count to angular