You have several options depending on how accurate your result has to be.
If you know your initial pH and you're using pure water you can obtain a good estimate by measuring the pH change combined with modelling of your system, for example with phreeqc. Alternatively you can sample your solution, add base to the sample and then titrate between both pK values of H2CO3. Other options are to add Ba and also make your samples alkaline. Then you can weigh the BaCO3 after drying.
but if I want to measure the bicarbonate and carbonate in buffer solutions like phosphate buffer (100 mM), how can i measure it? or can i use TOC Analyser for amount of Bicarbonate nad carbonate concentration.