Count the number of command