Fix composite key count(), fixes #350