Detect the number of commitment