fn get_input_field_count(rel: &Rel) -> usize
Helper function to get the number of input fields from a relation. This is needed for Project relations to calculate output mapping indices.