I think we prefer the more pythonic `sum(not s.is_integer for s in (2*x+7+z).free_symbols)`