ATMs aplenty
There are plenty of ATMs of various banks around the Denpasar area and Ubud. You'll have no trouble finding one. The key thing is to find one that dispenses Rp in 50000 bills. 100000 bills get you lots of annoyed looks by shopkeepers. Which leads to your question about how much to take out. If you are planning on buying some really nice things, then 5 million might be good, but I'd start with 2 million and get more if you need it. If you were to spend 5 million in 4 days without buying something really really nice, I'd say youre getting taken advantage of.