To get the number of times a particular string occurs in another string
DECLARE @STR VARCHAR(100) = 'ABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDE'
DECLARE @SEARCH VARCHAR(10) = 'A'
-- TO GET THE NUMBER OF OCCURRENCE COUNT
SELECT (LEN(@STR) - LEN(REPLACE(@STR,@SEARCH,'')))/LEN(@SEARCH) OCCURRENCECOUNT