Tesla (TSLA  ) shares were up more than 5% following the company's Q4 earnings report which showed the company exceeding analysts' expectations on the top and bottom lines. Shares got a lift from CEO Elon Musk's comments that the company should be able to produce 2 million cars next year which is a significant increase and an indication that supply chain issues are firmly in the rear view mirror.

Over the past year, Tesla shares are down by more than 50%, although they are up by 17% this year, along with the broader rally in the stock market as long-term rates have declined. The company has faced a torrent of headwinds, including controversies generated by Musk due to his behavior and acquisition of Twitter. Additionally, competition in the EV market is heating up, while rising short-term rates are a headwind for high-multiple stocks like Tesla.

Inside the Numbers

In Q4, Tesla reported $1.19 in earnings per share which was higher than analysts' estimates of $1.13 per share. Revenue also came in higher than expected at $24.3 billion vs estimates of $24.2 billion. Overall, earnings were up about 37%, while revenue was 33% higher.

One negative from the report was automotive gross margins compressing to 25.9% which is the lowest figure in 5 years. It's likely an indication that per-unit costs have risen due to inflation and higher salaries, while the company's pricing power is eroding.

The company acknowledged these challenges and noted that as volumes increase, pricing power would decline. With higher volumes, the company said that it would have to compete on price. In essence, it's becoming like other car companies as it increases volumes. Over the last few months, the company has cut prices, and the value of used Teslas have also materially declined.

The company didn't issue any guidance for the upcoming quarter or full year. However, Musk said the company should be able to attain production of 2 million new cars unless there is some unpredictable, outside event that prevents it from reaching this goal.

Musk also pushed back against the notion that his behavior and comments on social media could alienate potential customers. He said, "I've got 127 million followers. And it continues to grow rapidly. That suggests that I'm reasonably popular. I might not be popular with some people. But for the vast majority of people, like the follower count speaks for itself... So Twitter is actually an incredibly powerful tool for driving demand for Tesla."