How numerous were dragons in the time before 'Lord of the Rings' and 'The Hobbit'? How many dragons did Tolkien ever mention by name?
As usual, Tolkien Gateway has the best compilation of info:
Total numbers aren't given but there were many:
Dragons were "created" by Melkor/Morgoth during the early part of the First Age of the Sun, and for a long time the only dragon mentioned by name was Glaurung, the father of dragons. We may assume that more dragons were being bred in the Pits of Angband during this time.
The first occurrance of more than one dragon was at the Battle of Unnumbered Tears, where we read:
Following this battle, and until the Fall of Gondolin, Glaurung is again the only dragon mentioned as being active in Middle-earth, but at the Fall of Gondolin they come out again (Glaurung had been killed by Turin by this time):
Finally, at the War of Wrath, we see the first appearance of the winged dragons:
During the War of Wrath most dragons were killed (including Ancalagon); some variants of the texts note that two escaped, but the Silmarillion itself is not specific about the number:
Dragons were entirely inactive during the Second Age, and only reappeared after a good part of the Third Age had passed, as the Tale of Years (LotR Appendix B) notes:
At no stage is the actual precise number of dragons given.
The most famous dragon in Middle-earth is, of course, the Green one in Bywater.
The LOTR wiki identifies 7 dragons by name (as well as a host of other dragons described but not named)
The Silmarillion also identifies that in the "War of Wrath", Ancalagon commanded a "Dragon-host" (e.g. a sizeable number of other dragons). There's no specific numbers but we're left to infer that it was a substantial armada since their destruction effectively ended the reign of dragons on Middle Earth.
There's also a handy (but completely non-canon) size-chart :-)
There is no canon reference for the total number of dragons.
Dragons referenced by name:
It's also of worth noting that dragons first appeared in FA 260 and continued to exist at the time of Lord of the Rings. When discussing destorying the Ring, Gandalf said "there is not now any dragon left on earth in which the old fire is hot enough", implying that some dragons still existed.