Counting integer points in parametric polytopes using Barvinok's rational functions