Ok this is a big question. Think about it this way. When some nouns can be both we are often talking about part and whole. In your first example " I have 5 cucumbers or I have some cucumbers". If you have 5 whole cucumbers,then they are countable. If you took some and added it to a salad, you might say "I added some cucumber to the salad". Not all 5 of them, just some.
Meat in general is uncountable. I don't eat meat, for example. But there are many kinds of meats. If you distinguish between the different kinds of meats or fruits then you can use the plural form. But in general they are considered noncount. Does this make sense?
good luck.
Bread is uncountable when we talk about it in general. I had (some) bread for breakfast. But if you use a word like "loaf" or "slice" those are countable. Now it is the loaf or slice you are counting, not the bread. So, I had a slice of bread for breakfast.