It seems to look like a fingering number but I don’t have 7 fingers and the note is already marked with a fingering number. This is from Chopin's Fantaisie-Impromptu, Op. 66.
This is a tuplet, indicating that seven notes in the right hand are to be played in the same time as the regular six in the left. You have probably already encountered triplets, the most common tuplet, earlier in the same piece.
Here it is in another edition which makes its separation from the fingering clearer: