There are several things to address here:
Zones vs files
It's probably more relevant to talk about how many zones they have, rather than how many files they have.
It will depend on the nameserver software how zone data is stored. (Eg individual files, data for all zones compiled into a combined file, an RDBMS, something else.)
What matters is the responses sent over the wire, not how the data is organized on the server.
Contents of the root zone
The root zone is delegation-only (as a policy), but that doesn't strictly mean that there are only NS
records.
At the apex, there are the mandatory SOA
+NS
records, as well as the DNSKEY
public keys for the keypairs used to sign the zone.
Then there is the bulk of the zone, which are the delegations (NS
), including glue address records (A
/AAAA
) for the nameserver names as well as DS
for any signed delegations.
And finally the RRSIG
and NSEC
records used to sign data that is there and prove non-existence of the things that are not there.
There is a copy of the full root zone accessible via HTTP, if you want to have a look.
Zones on the root servers
The "root servers" (a.root-servers.net
, b.root-servers.net
, etc) do in fact host other zones in addition to .
. Not by necessity, but in practice it is set up that way.
I can immediately think of arpa
, there could be some other zone as well.
Contents of TLD zones
The gTLDs are also essentially delegation-only (again, as a policy), so these zones essentially have the same kind of contents as what is described for the root zone above.
Some ccTLDs (TLDs for, and operated by, countries) have deviating policies, serving some other data straight in the TLD zone. However, the general expectation is that you more or less only have delegations in your TLD zone.
Zones on TLD servers
This varies a lot. Some have just a single zone, others multiple zones.
A long-standing example is that com
and net
are served off the same set of nameservers (a.gtld-servers.net
, b.gtld-servers.net
, etc).
Conclusion
There is nothing special conceptually about the root zone or the TLD zones. They work just like any other zones and the nameservers these zones are hosted on work just like any other nameservers.
There are some policies in place for these zones to maintain order more so than anything else. (Like the delegation-only policies.)