Add support for the number of runing tasks