I happened to encounter a related problem recently in answering a question regarding a paper on virus classification. I am not a microbiologist, so this answer may be flawed, however it raises a point that I don’t think has been made in the other answers. I welcome corrections.
First, however, it is obvious that bacteria were identified many, many years before their sequences were available, and, as indicated in the answer by @Argalatyr, classification could only be on phenotypic characteristics. The imprecision of this is acknowledged in a statement in a 2000 review article by Dijkshoorn et al. ‘Strain, clone and species: comments on three basic concepts of bacteriology’:
“A species consists of strains of common origin which are more similar to each other than they are to any other strain.”
The paper I came across previously was by Bobay and Ochman (2018) in which they state:
“Members of a biological species are defined by their ability to exchange genetic material”
This definition — by its nature genotypic — clearly predates the DNA sequencing era. (In asexual organisms like bacteria, exchange of genetic material can occur by recombination of DNA.)
It should also be mentioned that this definition applied to bacteria does not require members of the same species to have the same number of genes (the concern of the question), only that they can recombine.
In their paper Dijkshoorn et al. go on to discuss current efforts to correlate what, I assume, is this accepted definition with DNA-based comparisons — 16S rRNA sequencing and overall DNA percentage identity.
“Recently, a comparison of DNA–DNA pairing data and 16S rRNA similarity data showed that strains with rRNA similarity less than c. 97% generally showed no significant DNA–DNA reassociation and thus belong to different species. Similarity >97% may or may not indicate close relationship. The use of this percentage as a rule of thumb has in many cases made rRNA sequencing replace the more cumbersome DNA–DNA pairing technique for the creation of new species. At present, either the 70% or the 97% rule is used to underpin most proposals for new species.”
The moral would seem to be that we have reached a stage where it is cheaper and easier to try to define species from DNA sequencing that to go into the laboratory and perform experiments to see whether they can exchange genetic material.