It might be a bit of a cop-out kind of answer, but: lots and lots of times! Probably too many times to number. God’s opinion on this is expressed well in (among other places) Jeremiah 32:30-35:
The people of Israel and Judah have done nothing but evil in my sight from their youth; indeed, the people of Israel have done nothing but provoke me with what their hands have made, declares the LORD. From the day it was built until now, this city has so aroused my anger and wrath that I must remove it from my sight. The people of Israel and Judah have provoked me by all the evil they have done — they, their kings and officials, their priests and prophets, the men of Judah and the people of Jerusalem. They turned their backs to me and not their faces; though I taught them again and again, they would not listen or respond to discipline. They set up their abominable idols in the house that bears my Name and defiled it. They built high places for Baal in the Valley of Ben Hinnom to sacrifice their sons and daughters to Molech, though I never commanded, nor did it enter my mind, that they should do such a detestable thing and so make Judah sin.
It was enough times for the Lord God to be accused of patient longsuffering (cf. Ex. 34:6), sending ‘word to [his people] through his messengers again and again, because he had pity on’ them (2 Chron. 36:15). ‘He is patient with [us], not wanting anyone to perish, but everyone to come to repentance’ (2 Peter 3:9).