Hi Matthias,
I think you're right in that len($input_type.input_bam) is inconsistent, we can implement __len__ for the collection case, but that is not done yet.
That said, unless your example is a toy example for a more complex scenario the switch seems unnecessary, a multiple="true" data paramater can take either multiple datasets or a collection.
Best, Marius