Count Substring In String Python Without Library Function In Php