much more efficient count by status