Fooods that contain carbohydrates also oftentimes contain fiber. Your body is unable to digest the fiber and therefore when you eat foods with carbs that also have fiber, you can net off the fiber. For example, if you eat an apple, it has 17gms of carbohydrates and 3 gms of dietary fiber. Therefore the net carbs in an apple is 14 gms. However, this happens only if you dont peel the skin before you eat the apple.
This explains the difference between “brown” and “white”for many food types including rice, wheat etc. The brown is the hull or the fiber in the food and reduces the total carbohydrates making the food more nutritious.
Legumes, Barley, buckwheat, oats, quinoa, rye, many fruits and vegetables have high fiber content. Refined flour on the other hand does not contain much fiber and is therefore not very healthful.
You should target to eat foods that have up to 25 gms of fiber per day.