We give an FPTAS for computing the number of matchings of size $k$ in a graph $G$ of maximum degree $Delta$ on $n$ vertices, for all $k le (1-delta)m^*(G)$, where $delta>0$ is fixed and $m^*(G)$ is the matching number of $G$, and an FPTAS for the number of independent sets of size $k le (1-delta) alpha_c(Delta) n$, where $alpha_c(Delta)$ is the NP-hardness threshold for this problem. We also provide quasi-linear time randomized algorithms to approximately sample from the uniform distribution on matchings of size $k leq (1-delta)m^*(G)$ and independent sets of size $k leq (1-delta)alpha_c(Delta)n$. Our results are based on a new framework for exploiting local central limit theorems as an algorithmic tool. We use a combination of Fourier inversion, probabilistic estimates, and the deterministic approximation of partition functions at complex activities to extract approximations of the coefficients of the partition function. For our results for independent sets, we prove a new local central limit theorem for the hard-core model that applies to all fugacities below $lambda_c(Delta)$, the uniqueness threshold on the infinite $Delta$-regular tree.