Should number of iterations of PBKDF2 stay secret? Let's say I encrypt my passwords with PBKDF2 and store it somewhere. Now let's say it was stolen and the hacker, who stole it knows it was hashed with PBKDF2.

Does a knowledge of number of iterations make it easier to brute force the password?
Reasons?
Normally we store the number of iterations with the hashed password. In the same string actually. 
This allows us to upgrade the number of iterations in a running system and in an interm phase have different passwords with different number of iterations.

If however you tried to keep the number of iterations secret, an attacker who knows the password for a single account could easily discover the number of iterations. 

If we really can't tell the number of iterations an attacker would need to assume an upper bound and both do more interm checks but more importantly may continue longer then needed if his upper bound isn't tight.

I do not recommend trying to hide this information.