A Dynamic Approach to Modeling Count Data Based on Intensity Functions of Non-Homogeneous Poisson Processes and Functional Data Techniques