Is there a certain amount of people tumblr allows you to unfollow a day? Also, if there is no limit it, is it risky to mass unfollow everyone in one day?
There is no limit to how many you can unfollow (when I last checked anyway). I haven't had an issue with mass unfollowing people using imacros scripts or just an autoclicker/recorder like Axife. I wouldn't say it's risky as I've been on Tumblr for years and never had any hassle.
If I remember correctly you can only follow 5,000 max, correct? If so I've definitely done it before and not had a problem. I have over 320,000 followers on Tumblr, I'd say it is safe. But it's down to you what you do at the end of the day, if you want to be really safe just do it in 1,000 chunks.
Tumblr enforces two limits on how many blogs you can follow. First, you can follow no more than 200 blogs per day on Tumblr. Second, you can follow no more than a total of 5,000 blogs on Tumblr. Once you follow 5,000 blogs, you would have to unfollow some blogs to start following additional blogs.