Apple is a notoriously secretive company. And for good reason: As the biggest company to ever exist, it wants to guard its next big product.

But sometimes we get a sneak peek into what that next thing might be. In this case, it’s the company’s Project Titan -- its autonomous driving initiative.

How did we find out about it?

It all happened when a former Apple employee was arrested as he was about to board a flight from the US to China, accused of stealing sensitive information from the company’s self-driving car project.

Reports say that Xiaolang Zhang, who was a hardware engineer in Apple’s autonomous vehicle team, allegedly downloaded technical manuals, engineering schematics and reports to his wife’s laptop. Prosecutors say Zhang was planning to leave Apple to start working for Chinese electric car startup Xiaopeng Motors.

(Alibaba is an investor in Xiaopeng Motors. Abacus is a unit of the South China Morning Post, which is owned by Alibaba.)

But in a strange twist of fate, it wasn’t the industrial espionage that let us find out about Project Titan -- but Apple itself.

That’s because when Apple takes those leakers to court, it’s often forced to reveal things it wouldn’t usually.

What did we find out?

Apple is devoting a lot of resources to the project.

The complaint, filed in a federal court in California, says 5,000 employees are “disclosed on the project.” (Picture: MacRumors)

In fact, according to the complaint: Approximately 5,000 of Apple’s 135,000 full time employees had access to the project. That’s equal to almost 4 percent of Apple’s full time employees.

As Axios pointed out, that doesn't mean that all 5,000 are devoted to the project -- but it does provide some interesting insight. One of the latest figures we have was from 2015, when Bloomberg claimed that Apple hired more than 1,000 engineers to build a car.

That initial project has now changed direction, focusing on software and sensors instead of the vehicle itself -- but that doesn’t mean Apple isn’t still looking at hardware.

The complaint says Zhang was employed to “develop software and hardware for use in autonomous vehicles”. It references a proprietary chip as well as power requirements, battery systems and drivetrain suspension mounts.

Apple now has a fleet of Lexus RX450h vehicles equipped with sensors. (Picture: Apple Insider)

Driverless race

Xiaopeng Motors -- also known as XPENG -- is among a growing number of Chinese vehicle start-ups hoping to upend legacy carmakers and newcomers like Tesla.

The increasing competition has also seen allegations of foul play in China.

In March, Chinese search giant Baidu dropped a lawsuit against JingChi, a driverless car start-up founded by one of its former executives. Baidu had accused the ex-employee of stealing in-house self-driving technology secrets. The case ended after JingChi became an official partner in Baidu’s self-driving platform Apollo.