If Alice and Bob both use static DH keys, they only have to perform the DH operation once to get their shared secret. The number of messages that are safe to exchange encrypted with something derived from that shared secret is not really a function of the DH problem, except to the extent that the size of the modulus and of the private keys put a limit on the maximum security strength of the shared secret.
However, there are other factors that might entail such a limit, such as whether or not they exchange nonces for the key derivation from the (calculated once) shared secret, which symmetric cipher they use for bulk encryption, which mode of operation is used, etc.
Another thing that might entail such a limit is their confidence in the key management of both Alice's and Bob's private key. If either private key is compromised, this will mean complete loss of confidentiality of all messages sent encrypted with a key derived from a shared secret calculated using that key. Again, this is a key management issue and not a security issue specific to static DH in any way, but it might be mentioned as the reason why there exist various hybrid schemes that mix long term asymmetric keys with ephemeral asymmetric keys.