updated the funciton of count commit