A man wants to get into a night club where the bouncers test each person before they can enter. The man waits and watches. A woman walks up to the bouncers and the bouncers say 6. The woman replies with 3 and goes in. A small man walks up and they say 12. The man replies 6 and is admitted. The first guy thinks he’s figured it out and walks up. They say 4 and the man replies with 2, but they don’t let him in.
A piano. The word piano has five letters, and the scale on the piano is A through G, seven letters. The piano keys don’t have locks and playing piano requires you to keep time (but with a metronome, not a clock).