I found this on the Resident Evil Wiki because I've always wondered myself why this wasn't a numbered entry:
"Capcom had originally planned 'Resident Evil Code: Veronica' to be their third installment in the series. However, due to a contract they signed with Sony which stated that their next numbered game was to be released on the PlayStation system, they made Resident Evil: Nemesis, their original spinoff, a main series installment (Resident Evil 3: Nemesis). Resident Evil: Code Veronica, which was meant to be their next main series installment, was instead made into their spinoff. Be that as it may, Resident Evil Code: Veronica is still considered part of the main series."
So technically this would've been Resident Evil 3 if anything.
"Capcom had originally planned 'Resident Evil Code: Veronica' to be their third installment in the series. However, due to a contract they signed with Sony which stated that their next numbered game was to be released on the PlayStation system, they made Resident Evil: Nemesis, their original spinoff, a main series installment (Resident Evil 3: Nemesis). Resident Evil: Code Veronica, which was meant to be their next main series installment, was instead made into their spinoff. Be that as it may, Resident Evil Code: Veronica is still considered part of the main series."
So technically this would've been Resident Evil 3 if anything.