ENG-5960: Fix partition count check on command log replay.

Please see commit message for details.