E2b: Reflect the count in alerts and messages tabs

Add test coverage.

Change-Id: Ia5658d2b0c230915cda9309a590b416b0aa73bfe