The mechanical Nikon F min t probably costs more to make the the EF mount.
Yes, more Nikon F mount lenses have been produced than Canon EF, in that the Nikon F mount remains basically unchanged since the 1960's so you can add on all the older Nikon F lense, but most of the 60-80's glass is no longer in use. So adding up the Nikon lenses vs Canon glass since 1987, when the Canon EF mount (then called EOS) was released, it would be a close tie, with 3rd party lenses possibly tipping the scale to Nikon.
As a long time Nikon F lens user, they are here today, will be here tomorrow (Nikon added their new E electronic Iris version, but still are making the mechanical F/G lenses too). While Canon's lens mount history is here today, Gone tomorrow, as the Canon FD mount the was killed by Canon with the release of EF/EOS mounts.
Canon has managed a high market penetration of EF-mount lenses, and the same theird party lens makers offering Nikon F mounts, also offer/sell their lenses in a Canon EF mount (which had to be reversed eingineered reducing the amount of lenses being offered. And Canon, I like Nikon, entered the Video market with Cine specific lenses and cameras, and some of these lenses are very good.
In the film days of photography, Nikon had the Pro still photographer market tied up, and Canon was always in second, and often third place, until they came out with some nice long zoom FD lenses for wildlife/sports photography and toward the end of the FD era, started giving Nikon a good market competition in this area.
Today (unfortunately) Caonon has pulled into the no 1 slot with the digital DSLR prosummer / pro-market, while Nikon is in the No 2 slot production number wise, but Nikon is still a better Pro shooter investment, as you get a longer shooting life and better reliability from a Nikon Pro DSLR camera.
Canon has the lower end consumer market today, hands down, while Nikon is struggling here to keep the numbers up. Mirrorless cameras from Sony, Panasonic and Olympus are starting to give the big two a run for their money, especially with cameras like the GH5, but for Pro work demanding larger sensors and higher resolution, the full frame DSLR is still king in the Pro still photography world as larger sensor cameras are in the Pro Cine world.
Even if their are more Canon lenses in use than Nikon F, I still prefer the Nikon, on the average, most Nikon lenses will optically out perform Canon EF lenses (their are some Pro CanonEF lenses that are as good, but not many in this area), the Nikon mount is a tighter specification and build tolerances are tighter, so less lens mount compatibility issues, and since Nikon is in formthe long run, a better future investment, as Nikon F can be adapted more readily to a non Nikon camera (simple mechanical adapters vs complicated, more expensive electronic EF adapters). So Nikon mount is the better investment, in my experience. Canon is more of a use it today, and toss it out tomorrow product, short life time.
For Video/Cine work, Nikon is much quicker and more precise to use on non Canon EF mount cameras than the adapted EF lenses are. PL mount is better yet, and my current mount of choice for video work. Also, Nikon lenses do not require electronic in camera correction for CA and distortion control that the other lens makers, including Canon, rely on which,is why these lenses often cost less, they are not as good optically, without digital corrections, that Nikon, Zeiss and Voightlander do not require.
Canon EF lens mount, (except for the new Cine locking EF mount, yet another change) is too sloppy, no useable witness marks, Iris needs to be set by camera, etc, for serious Video/Cine work.
But in the end, it boils down to budget and personal preferences as to which lens to use.