Given a string, 'theCode', and an integer, 'tabs', can anyone help me count the number of leading tabs in theCode and save that number to tabs?

Any help would merit my eternal gratitude!