We prove an analog of the Yomdin-Gromov lemma for p-adic definable sets and more broadly in a non-Archimedean definable context. This analog keeps track of piecewise approximation by Taylor polynomials, a nontrivial aspect in the totally disconnected case. We apply this result to bound the number of rational points of bounded height on the transcendental part of p-adic subanalytic sets, and to bound the dimension of the set of complex polynomials of bounded degree lying on an algebraic variety defined over C((t)), in analogy to results by Pila and Wilkie, and by Bombieri and Pila, respectively. Along the way we prove, for definable functions in a general context of non-Archimedean geometry, that local Lipschitz continuity implies piecewise global Lipschitz continuity.