Some and any mean 'a couple', 'a few' or 'a number of'.
Use some in affirmative sentences and in interrogative sentences in which the answer is likely to be 'yes' (affirmative)
I have some good friends.
Can I have some apples, please?
Any is used in negative sentences or in interrogative sentences.
I don't have any friends.
Did any of your photos come out well?
If 'some' and 'any' are part of a different word, the same rules apply.
Would you like something to drink?
Somebody gave me a ticket.
I'd like to go somewhere, but I can't think of anywhere to go to.
Much and many
Much and many both mean 'a lot'. Much is used with a singular noun (uncountable).