Charlie takes him to the doctor, and the nurse there doesn't seem to know about autism. Once Charlie and Raymond get seen, the doctor tries to counsel Charlie on how to deal with his brother.
The doctor claims that he doesn't know much about autism, but he wants to know if Ray has special abilities.
Charlie tells him about the toothpicks.
They start quizzing him on math.
They discover that Raymond can't do basic things like estimate the cost of a candy bar, but he's got exceptional mathematical abilities in other ways. The doctor asks Ray if he's autistic, and he says he doesn't think so.