Count methods in class

CXXRecordDecl::methods() appears to list all methods in the class and base classes. How would I get a list of only the methods declared in a class (none of the methods from base classes)?

It should only list methods in the current class (excluding those inherited
from base classes); do you have an example where it lists more than that?

On closer examination the unexpected methods (which matched the count from the base classes) were the compiler provided assignment operators.