apache plugin: DRY: use macro to determine number of fields.