The metaphysics of this is complicated. Multiple gods may have a relationship such that several are an aspect of another.
In the Brihadaranyaka Upanishad, we find this passage:
Then Vidagdha, the son of Sakala, asked him: “How many gods are there, Yajnavalkya?
Yajnavalky said, “As many as are indicated in the Nivid of the Visvadevas – 300 and 3003.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“Thirty-three.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“Six.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“Three.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“Two.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“One-and-a-half.”
“Very well,” said Sakalya. “How many gods exactly are there, Yajnavalkya?”
“One.”
“Very good,” said Sakalya, and he asked: “Which are those 303 and those 3003?”
Yajnavalkya said: “There are only 33 gods. These others are but manifestations of them.”