Fixing truncated rows counting