Well, you both have the right idea, but not quite the right answer. The code does not do anything to the lock, but as Melita moves the paintings she, or perhaps Ronin, might notice that they bear numbers upon their backs, carved into the corners.
Baby Painting: 7
Teenagers: 0
Family: 3
Old Man: 5
Baby Painting: 7
Teenagers: 0
Family: 3
Old Man: 5