We transform the two-dimensional Dirac-Weyl equation, which governs the charge carriers in graphene, into a nonlinear first-order differential equation for scattering phase shift, using the so-called variable-phase method. This allows us to utilize the Levinson theorem, relating scattering phase shifts of a slow particle to its bound states, to find zero-energy bound states created electrostatically in realistic structures. These confined states are formed at critical potential strengths, which leads us to posit the use of "optimal traps" to combat the chiral tunneling found in graphene: this could be explored experimentally with an artificial network of point charges held above the graphene layer. We also discuss scattering on these states and find that the s states create a dominant peak in the scattering cross section as the energy tends towards the Dirac point energy, suggesting a dominant contribution to the resistivity.