How to calculate hydrogen from SMILES string?
Other answers have done a good job of providing a description of the concepts and algorithms needed to answer the question.  Here I'll demonstrate the opposite: a black-box empirical approach.

In Python using rdkit:

from rdkit import Chem
from rdkit.Chem import rdMolDescriptors

my_smiles_string = 'C1=CC(=C(C=C1C(CN)O)O)O'
my_mol = Chem.MolFromSmiles(my_smiles_string)
print(rdMolDescriptors.CalcMolFormula(my_mol))


This shows the result C8H11NO3.  You could parse that further to get only the number of hydrogens, if you need to do so.  Alternately:

my_mol_with_explicit_h = Chem.AddHs(my_mol)
print(my_mol_with_explicit_h.GetNumAtoms() - my_mol_with_explicit_h.GetNumHeavyAtoms())


displays 11.  Slightly more cumbersome but it has the output you want.  If you take the latter approach you don't even need to import rdMolDescriptors.