calculating stings

calculating number of stings