  Consider the polynomial optimization problem whose objective and constraints
are all described by multivariate polynomials. Under some genericity
assumptions, %% on these polynomials, we prove that the optimality conditions
always hold on optimizers, and the coordinates of optimizers are algebraic
functions of the coefficients of the input polynomials. We also give a general
formula for the algebraic degree of the optimal coordinates. The derivation of
the algebraic degree is equivalent to counting the number of all complex
critical points. As special cases, we obtain the algebraic degrees of
quadratically constrained quadratic programming (QCQP), second order cone
programming (SOCP) and $p$-th order cone programming (pOCP), in analogy to the
algebraic degree of semidefinite programming.
