What is the limitation on the number of fields you can add to a module?

Is there a limitation on the number of fields you can add to a module? Or is the limitation based on the size of the field?