This paper develops a peer effect model for count responses under rational expectations. The model accounts for heterogeneity in peer effects across groups based on observed characteristics. Identification is based on the linear model condition that requires the presence of friends of friends who are not direct friends. I show that this identification condition extends to a broad class of nonlinear models. Parameters are estimated using a nested pseudo‐likelihood approach. An empirical application to students' extracurricular participation reveals that females are more responsive to peers than males. An easy‐to‐use R package, CDatanet, is available for implementing the model.