The sum of the interior angles of a polygon is given by:
[tex]\text{Sum}=(n-2)\times180[/tex]Where n is the number of sides.
When we divide the sum by the number of sides we obtain the measure of each interior angle, then:
[tex]\frac{Sum}{n}=135[/tex]By replacing the sum by the formula we can solve for n:
[tex]\begin{gathered} \frac{(n-2)\times180}{n}=135 \\ (n-2)\times180=135n \\ \text{Apply the distributive property} \\ 180n-360=135n \\ 180n-135n=360 \\ 45n=360 \\ n=\frac{360}{45} \\ n=8 \end{gathered}[/tex]Thus, the number of sides of the regular polygon is 8.