It seems most likely that “Sing a Song of Sixpence” simply refers to the then practice at banquets of cooking live birds in a pie crust, which when cut, would allow the birds to fly out spectacularly and surprisingly!
It’s possible that the pocket full of rye may have been a measurement of the day, and the counting-house, (which is also referred to in The Merry Wives of Windsor), was the office where the money part of a business was transacted.
Sing a Song of Sixpence has been used by Agatha Christie as the premise for a Miss Marple mystery entitled, “A Pocket Full of Rye.” The story progresses as one character after another is murdered. A financier (a stand-in for the king) is found dead with a pocket full of grain, his wife (the queen) is poisoned at teatime in the parlor, and the maid is found strangled with a clothespin on her nose. Miss Marple, remembering her nursery rhymes, recognizes the pattern and sets out to find the perpetrator, the blackbird of the crime.
Sing a Song of Sixpence Lyrics
Sing a song of sixpence,
A pocket full of rye;
Four and twenty blackbirds
Baked in a pie.
When the pie was opened
The birds began to sing;
Was not that a dainty dish
To set before the King?
The King was in his counting house
Counting out his money;
The Queen was in the parlour
Eating bread and honey.
The maid was in the garden
Hanging out the clothes;
There came a little blackbird;
And pecked off her nose.