fixed a bug of counting running scripts

Signed-off-by: Gerald <gera2ld@163.com>