Strange count query #553 fix