I’m betting the gun was in the glove compartment to start with....and I’m also betting the magazine was separate....
The original story said it was in view, partially obscured by a sweatshirt.
Even if the magazine were out, the officer had no cause to count rounds. Heck, especially if the magazine were out...since the officer would have no need to touch it at all, to clear the weapon.