Given an algebraic map $f: B^d \to \mathbb{R}$, from the unit ball of dimension $d$ to the real, let $Y = f^{-1}(0)$. Then it is always possible to find a smaller ball $B_r \subset B^d$ not necessarily centered at $0$, such that for all lines $l$ going through $B_r$, $|l \cap Y| \le k$, where $k$ is the maximum degree of $f$.

Is the analogue of this for higher codimension still true? By that I mean if $f: B^d \to \mathbb{R}^k$, $k \le d$, and q is a regular point of $f$. Then is it true that we can always find $B_r$ such that for all affine $n$-planes going through $B_r$, the number of intersections of the plane and $Y = f^{-1}(q)$ is bounded by the maximum degree of $f$, or perhaps some other polynomial bound depending only on the max degree of $f$?

I feel this should be doable using basic calculus of one variables, eg. mean value theorem. But it seems complicated.