"The Comet" is number 183 in the Hans Christian Andersen Center's register of Andersen's literary works, i.e. no. 183 in the category fairy tale (the range 1 - 300).
"The Comet" was first published in English June 1869, cf. the bibliographic description (in Danish) in : H.C. Andersen-Centrets bibliografiske optegnelser:
The first Danish edition (August 1869): Kometen.
The work was published later (30 March 1872) as a part of Nye Eventyr og Historier. Tredie Række. Ny [første] Samling. 1872 [Danish title]. (Number 335. BFN 1017. Category/genre: Fairy tale collection).