Count Strings Hackerrank Solution Python Interview