Dangerous cast, count number of tasks in for loop of 404