Minor cleanup; don't count null keys.