Especially in IT it is often neccessary to write chains of nouns like messages list because one cannot use list of messages for a variable name in a programming language.
I can't understand how to construct them correctly for plurals, for example is it a "message list" or "messages list"? What grammar rules concern this subject?
As a maybe special case, I'm interesting in naming the number of something, for example the number of apples. It is common to use "apple count" (although count means counting, not quantity). What is right, "apple count" or "apples count", and why?
I found a little bit similar question. Maybe both forms are allowed?