Text this: Counting, sampling and integrating