How many elements have been identified for which there are no known spectral lines?
tl;dr: Eighteen, or all of them above A=100.
One place to start is a 2015 article by H. Backe et al. in Nuclear Physics A on "Prospects for laser spectroscopy, ion chemistry and mobility measurements of superheavy elements in buffer-gas traps". For the elements Np, Pu, Am, Bk, Cm, Es, and Fm they note:
In each actinide spectrum tens of thousands of spectral lines can be observed. The levels are organized into terms, some dozen of terms form a configuration, and there are a dozen or more configurations. The order of hierarchy is not evident since there is considerable overlapping of different configurations and since the terms are not pure in any coupling scheme they must be described as mixtures (configuration mixing). In most cases, the levels can be identified only by comparison with theoretical calculations.
The rest of the paper then goes on to discuss how things like single ion traps or in-beam measurements could be used in the future to investigate the superheavy elements which are made one atom at a time in accelerators (as opposed to neutron absorption in high flux reactors, which is only good up to Fermium). Two comments: first, it is not surprising that with ~100 electrons on an atom there could be 1000s of spectral lines. Second, finding one or even a few lines in the spectrum of a star hardly seems to justify connecting those to a specific element, particularly a superheavy element.
A recent example of an in-beam measurement of Einsteinium was just published in Physics Review C, where a reactor-generated "bulk" (4 picograms of $^{255}$Es to 4 nanograms of $^{254}$Es) sample was ionized, accelerated, and laser resonance ionization spectroscopy was used. Based on Figure 1 in that paper, as of right now $^{255}$Fm is the heaviest element that has optical spectroscopy data.
Another paper of interest would be from Physica Scripta, particularly Figure 7 which shows the broad range of isotopes for which laser spectroscopy has been performed at on-line radioactive beam facilities. It indicates the $^{255}$Fm isotope, but does not contain the later publication of $^{253}$Es and $^{255}$Es in the reference above, presumably since they did not have a time machine available.
So, as of March 2022, no elements above Fermium (A=100) have any spectroscopic lines identified for either neutral or ionized species.
Comments have asked about several specific rare lighter elements. The emission spectra of Actinium was pretty well measured by William F. Meggers et al., Journal of Research of the National Bureau of Standards Vol 58(6) June 1957, identifying 500 lines between $206.2$ and $788.682$ nm. Meggers had previously worked on Promethium, published in the Journal of Research of the National Bureau of Standards Vol. 46(2), February 1951. More than 2200 lines between $220$ and $690$ nm were measured. A 2006 paper in Reports on Progress in Physics by E. Gomez et al., titled 'Spectroscopy with trapped francium: advances and perspectives for weak interaction studies' nicely covers work up to then on Francium using single ion traps. To quote the abstract:
The studies include the location of energy levels, their hyperfine splittings and their lifetime. All of these levels are close to the ground state. The results show a remarkable agreement with calculated ab initio properties to a degree that is comparable with other stable alkali atoms.
Apparently they intend (although I have not followed up on it) to perform parity non-conservation measurements to test the weak interaction, and will use precision spectroscopy of Francium to do it.