Use lexical_cast to get integer from string re #8397

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
Merge branch 'feature/8397_nprof_number' into develop