Bounding the number of lattice points near a convex curve by curvature