Compact electromagnetic flow meter