  Tidal streams in the Milky Way are sensitive probes of the population of
dark-matter subhalos predicted in cold-dark-matter (CDM) simulations. We
present a new calculus for computing the effect of subhalo fly-bys on cold
tidal streams based on the action-angle representation of streams. The heart of
this calculus is a line-of-parallel-angle approach that calculates the
perturbed distribution function of a given stream segment by undoing the effect
of all impacts. This approach allows one to compute the perturbed stream
density and track in any coordinate system in minutes for realizations of the
subhalo distribution down to 10^5 Msun, accounting for the stream's internal
dispersion and overlapping impacts. We study the properties of density and
track fluctuations with suites of simulations. The one-dimensional density and
track power spectra along the stream trace the subhalo mass function, with
higher-mass subhalos producing power only on large scales, while lower mass
subhalos cause structure on smaller scales. The time-dependence of impacts and
of the evolution of the stream after an impact gives rise to bispectra. We
further find that tidal streams are essentially corrugated sheets in the
presence of subhalo perturbations: different projections of the track all
reflect the same pattern of perturbations, facilitating their observational
measurement. We apply this formalism to density data for the Pal 5 stream and
make a first rigorous determination of 10^{+11}_{-6} dark-matter subhalos with
masses between 3x10^6 and 10^9 Msun within 20 kpc from the Galactic center
(corresponding to 1.4^{+1.6}_{-0.9} times the number predicted by CDM-only
simulations or to f_{sub}(r<20 kpc) ~ 0.2%). Improved data will allow
measurements of the subhalo mass function down to 10^5 Msun, thus definitively
testing whether dark matter clumps on the smallest scales relevant for galaxy
formation.
