Documentation and example for CountByStatus.