add function of counting numbers