how many resistance do i need to safe the LED of PC814?
The forward voltage is listed as 1.2V (typical) at a forward current of 20mA.

This means that from a 5V drive voltage you need to have a resistor that "drops" 3.8V when conducting 20mA. This means it's resistance is 3.8/0.02 = 190 ohm

Considering that the peak forward current is 50mA, you should be OK with a 180 ohm resistor