Question: # of variables in a polynomial?

Hello, everyone! Given a polynomial: f := x^2*y + 10*z*w + 2*a*t I would like to know how many different variables appear in f. Is there a command I can use to do this? My actual polynomial is more like: f := x[1]^2*x[2] + x[127]*x[3] + ... Any help would be appreciated! Thank you very much, and happy holidays! Best, Susan
Please Wait...