What is the optimal number of times to contact a contact?

There is no set number. The key is to engage regularly without overdoing it. Daily is typically too much while contacting contacts once and then never again isn't a good option either. 

Determining when to follow-up is made easier by sorting your contacts into different groups, based on their specific interests and level of previous engagement with you. This will help you track when it is time to send another message.