Real Root Counting For Parametric Polynomial Systems And Applications.