I have a second algorithm that generates random 1024 char strings. This algorithm loops and detects if there's a collision between the newly generated hash and any previous one. How many iterations with no collision do I need [...]?
With a hash function you want a uniform distribution. So if you hash random data a bunch of times, you want the results to contain each result the same number of times.
This property of uniform distribution is hard to translate to your question. You want to know the number of results without collision. However, this is hard to measure because each iteration there is a chance of a collision. This chance increases with the number of iterations. But because it is a probability, if you get a collision after 10,000 iterations you don't know if your hash function is faulty or that you got unlucky.
A better way would probably be to generate a lot of hash values and then look at the distribution of 0's and 1's of each bit. In a uniform distribution, you would expect each bit to have 50% chance of being 0 and 50% chance of being 1.
As for the calculating the probability, this article can help to calculate the probability of a collision.
This article gives numbers on the uniformity of commonly used hash functions.