New Delhi(CNN) A 7-year-old boy complaining of jaw pain was found to have 526 teeth inside his mouth, according to the hospital in India where he was treated.

The boy was admitted last month in the southern city of Chennai because of swelling and pain near his molars in his lower right jaw.

When doctors scanned and x-rayed his mouth, they found a sac embedded in his lower jaw filled with "abnormal teeth," Dr. Prathiba Ramani, the head of Oral and Maxillofacial Pathology at Saveetha Dental College and Hospital, told CNN.

An x-ray of the boy's mouth shows the sac.

While the surgery to remove the teeth took place last month, doctors needed time to individually examine each tooth before they could confirm their findings.

After discovering the sac, two surgeons removed it from the boy's mouth. Then Ramani's team took four to five hours to empty the sac to confirm its contents and discovered the hundreds of teeth.

The 7-year-old was released three days after the surgery.

"There were a total of 526 teeth ranging from 0.1 millimeters (.004 inches) to 15 millimeters (0.6 inches). Even the smallest piece had a crown, root and enamel coat indicating it was a tooth," she said.

The boy was released three days after the surgery and is expected to make a full recovery, Ramani said.

Ramani said the boy was suffering from a very rare condition called compound composite odontoma. She said what caused the condition is unclear, but it could be genetic or it could be due to environmental factors like radiation.

The boy actually may have had the extra teeth for some time. His parents told doctors that they had noticed swelling in his jaw when he was as young as 3, but they couldn't do much about it because he would not stay still or allow doctors to examine him.

Some of the 526 teeth removed from the sac are displayed.

Dr. P. Senthilnathan, head of the hospital's Oral and Maxillofacial Surgery Department and one of two surgeons who operated on the boy, detailed the procedure to CNN.

"Under general anesthesia, we drilled into the jaw from the top," he said. "We did not break the bone from the sides, meaning reconstruction surgery was not required. The sac was removed. You can think of it as a kind of balloon with small pieces inside."

Dr. Senthilnathan said the discovery showed it was important to seek treatment for dental issues as early as possible.

Awareness about dental and oral health was improving, he said, though access in rural areas remained problematic.

"Earlier, things like not as many dentists, lack of education, poverty meant that there was not as much awareness. These problems are still there.

"You can see people in cities have better awareness but people who are in rural areas are not as educated or able to afford good dental health."

In Ravindrath's case, all has turned out well; the boy now has a healthy count of 21 teeth, Dr. Senthilnathan said.