Find number of zeroes of a polynomial function