What determines how much water of crystallisation a salt has?
The water of crystallization in a crystal of any ionic salt can be associated with the size of the cation, magnitude of charge on it, tendency for co-ordination and hydrogen bonds, its lattice structure and other factors involving the anion. But we cant actually theoretically determine why a particular salt has these man water of crystallization. We determine this experimentally in the labs.Then after finding this data for a set of salts we try and link them with the above mentioned factors and try to give a suitable explanation which justifies real data to the greatest possible extent. A theoretical explanation would be very complex and definitely involve way more parameters than what I mentioned above to be accurate for max cases.Even there isn't any 100% full-proof theory or mathematical formula that would allow us to calculate the water of crystallization in any random salt.