supplying count value from another method