fn validate_count( count: u64, max: usize, remaining_bytes: usize, item_name: &str, ) -> Result<usize>
Validate that a count is within limits and reasonable for the remaining bytes