In $\triangle ABC$, $AC=BC$, and $m\angle BAC=40^\circ$. What is the number of degrees in angle $x$? [asy]
size(80);
draw((0,0)--(7,0));
draw((0,0)--(3,2)--(6,0));
label("$A$",(0,0),W);
label("$B$",(6,0),S);
label("$C$",(3,2),N);
label("$x$",(6,0),NE);
[/asy]
Triangle $ABC$ is isosceles with equal angles at $A$ and $B$. Therefore, $m\angle ABC = m\angle BAC = 40^\circ$.

Angle $x$ is supplementary to $\angle ABC$, so \begin{align*}
x &= 180^\circ - m\angle ABC \\
&= 180^\circ - 40^\circ \\
&= \boxed{140}^\circ.
\end{align*}