Refactor status count