Due to a 2.1.2 cleanup of DBDirectClient count() logic, errors are no longer reported as count = 0. However, this means the (otherwise harmless) versioning errors abort the mapreduce command when migrations occur.
Best fix would be to turn off versioning for these counts, but could also restore previous behavior by wrapping counts and returning 0 on error.