encoder

hi, i changed int encoder0Pos = 0 to longencoder0Pos = 0 and i get following numbers.
21094
21095
21096
21097
21096
21097
21098
st1
2
1
2
1
it, ended after 21098.
and after 1, i continued rotating the encoder and the following is the numbers i get.
45053
45054
45055
45056
st1
art
2
3
4
5
6
2
1
it ended after 45056. i think st1 and art means start.
i hope i could know why i get such irregular numbering patterns.