Basically you have to count all the carbs in you snack or meal:
-cereals (wheat, rice, rye, oat, quinoa, millet...)--> bread, pasta, noodles, flour, cakes, biscuits, pastry, breakfast cereals
-fruit and vegetables --> potato and potato products, fruits and dried fruits, fruit juice
-dairy product -->milk (10g of carbs in 100ml), yoghurt, ice-cream
Beans and pulses contain carbs as well but i was told not to count them as the release of the glucose it contains is very slow.
You have to determine a ratio to use. Try to cover 10 grams of carbs by 1 unit of insulin. If this 1 to 1 ratio works for you, you can apply it to every meal or snack. You may need a 2 to 1 ratio (2 units for 10g of carbs) or more. It's up to you to determine it by counting the carbs in your meal and adapting your insulin intake. Obviously you can only see the result of this regim by testing you BG level. Try to test before meals (a BG test 2 hours after a meal can be confusing because your quick acting insulin is still doing its job). Look at the labels on your food. After a while you'll be able to estimate your meal just by looking at it. It's quite complicated and i hope i'm not confusing you.
Take care.