The number of fields in a FileMaker table are something that cannot be changed dynamically. (And recurring imports import into the same table each time. I suppose something might be done using the New table option for the import table, but that then opens up many more problems for you once you try to work with such a table.)
Can you describe in greater detail exactly what it is that you need to accomplish here? Perhaps with an example?
I have a looping function that will transfer data. I need to be able to count the number of fields in a table or layout to set a variable to an integer value of number of fields in layout or table.
You might want to describe that "looping function" in more detail and explain why you decided on that approach. I can't help thinking there's a simpler approach that doesn't require such a loop.
ValueCount ( FieldNames ( Get ( Filename ) ; "YourTableName" ) )
will count the number of fields defined in a given table.