The Range and Roots Constraints: Specifying Counting and Occurrence Problems