First-Order Model Counting and Sampling