Quantifying Abelianness